Skip to content

[go1.8] New behavior in HTTP client redirect #29602

@cpuguy83

Description

@cpuguy83

Go 1.8 changes behavior for HTTP redirects (specificlaly 301, 307, and 308) in the client .
The Docker client (and by extension docker API client) can be made to to send a request like POST /containers//start where what would normally be in the name section of the URL is empty. This triggers an HTTP 301 from the daemon.
In go 1.8 this 301 will be converted to a GET request, and ends up getting a 404 from the daemon.

This behavior change manifests in the client in that before the 301 was not followed and the client did not generate an error, but now results in a message like Error response from daemon: page not found.

This should be minor, but also already found a place in our test suite that this is an issue (easy fix).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions