Skip to content

net/http: regression in client redirect logic #18570

Closed
@dsnet

Description

@dsnet

Commit 7db996e alters the behavior of redirects with the HEAD method unnecessarily.

The logic in Go1.7 had the following properties:

The logic in Go1.8 has the following properties:

For backwards compatibility reasons, we should keep redirecting HEAD as HEAD. There is no harm in preserving this old behavior since the RFC doesn't specify that methods must be set to GET for 301, 302, and 303 redirect.

Reproducer: https://play.golang.org/p/kKuGNRjHV9

\cc @bradfitz @odeke-em

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions