k6 icon indicating copy to clipboard operation
k6 copied to clipboard

Redirects without location are broken due to current version of go

Open mstoykov opened this issue 2 years ago • 0 comments

Summary:

Location header isn't required for any redirect (3xx), this was previously not correctly supported in go for 301-303 statuses, for which it was a requirement.

This has been fixed in the current gotip(possibly to be released in 1.19).

K6 did previously have a test for this that has been removed.

But this is still broken on all currently released version of go (up to 1.18).

Suggested fix:

Given that this is behavior from the stdlib fixing it seems impossible without forking it so - we are unlikely to fix it. We will just wait for go version with the fix to be released and use that.

So this issue mostly exist to document the fact that currently k6 isn't compliant with the RFC and will likely be closed when a version of k6 is released with a go version that fixes it.

Other "fixes:

As discussed in https://github.com/grafana/k6/pull/2472 we could keep the broken behavior for a time even with a version of go that fixes it. This has been mostly been abandoned as an idea, but is linked for reference.

mstoykov avatar Apr 04 '22 08:04 mstoykov