Skip to content

net/http: client proxy authorization issue #8978

Closed
@gopherbot

Description

@gopherbot

by guohongqiao:

I am using go1.3.3, and test with the following code, it works well
http://play.golang.org/p/ue0YHoz-3e

however, when I try to use the basic authorization of the client package with the
following code,
http://play.golang.org/p/SKk2oiQgJj 

the proxy server(squid3) will prompt "407 Proxy Authentication Required"

the difference between the two snipet is the http requet header. 
The first use "Proxy-Authorization", and the second use 
"Authorization" in the method SetBasicAuth.

there is also an issue that http client discard the http headers(including
Proxy-Authorization) when the server redirect with 301.

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