Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http #40120

Closed
juzidong opened this issue Jul 8, 2020 · 2 comments
Closed

net/http #40120

juzidong opened this issue Jul 8, 2020 · 2 comments

Comments

@juzidong
Copy link

@juzidong juzidong commented Jul 8, 2020

What version of Go are you using (go version)?

$ go version 1.36

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

When I got a 302 Redirect with Location containing a '\t', the http.client went wrong.
func (c *Client) do(req *Request) (retres *Response, reterr error) {
...
u, err := req.URL.Parse(loc)
if err != nil {
resp.closeBody()
return nil, uerr(fmt.Errorf("failed to parse Location header %q: %v", loc, err))
}
...
}

What did you expect to see?

I'd like to see the Location should replace all '\t' with "" before Parse().

What did you see instead?

@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Jul 8, 2020

that does not appear to be a valid go version

can you show an example of a Location you are getting?

@mvdan mvdan added the WaitingForInfo label Jul 8, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 8, 2020

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.