Skip to content

net/http: redirect should requires Location header #51345

Closed
@yywing

Description

@yywing

When get a http response with status 302 and no Location Header

  1. call redirectBehavior get shouldRedirect true https://github.com/golang/go/blob/master/src/net/http/client.go#L738
  2. build next request ,and check Location Header https://github.com/golang/go/blob/master/src/net/http/client.go#L645
  3. call CheckRedirect

It should be:

  1. call redirectBehavior get shouldRedirect true
  2. call CheckRedirect
  3. build next request ,and check Location Header https://github.com/golang/go/blob/master/src/net/http/client.go#L645

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions