Skip to content

net/http: RoundTripper behavour change #10918

@kylewolfe

Description

@kylewolfe

Change in question: e1d9fcd#diff-91f5f51987ce03a73a7d2e8b701f84e9R142

I realize that the functionality of RoundTripper was poorly defined. I tried asking several times on the gonuts forum as well as stackoverflow as to its intention, and how it should be used. With this change however, it now breaks some functionality I had in a previous version of Go.

I unfortunately have to deal with SOAP APIs quite frequently. So I use a custom RoundTripper that parses the response body for the fault and returns a new error type specific to a soap fault. While I know this goes against what was then slightly documented (http://golang.org/pkg/net/http/#RoundTripper), I'm note sure I'm sold that this restriction of resp == nil when error != should be enforced, as it was not before.

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