Closed Mojofreem closed 9 years ago
Sorry for the super late reply, but yes, of course this would be a fine addition. I'll merge it today.
I made one small change. Instead of this:
client := &http.Client{Transport: bow.transport}
I used this:
if bow.transport != nil {
client.Transport = bow.transport
}
I'm also not setting the transport automatically in surf.NewBrowser()
. We'll let the http.Client use it's default transport mechanisms unless the developer explicitly sets their own.
While attempting to manipulate an https url, I encountered problems with an unverified x509 certificate:
err = x509: certificate signed by unknown authority
Googling indicated that this is a known issue for some sites under OSX. The recommended fix was to adjust the
http.Transport
to ignore unverified certificates. Reference the following Google groups link:https://groups.google.com/forum/#!topic/golang-nuts/v5ShM8R7Tdc
I modified my version of surf to expose a method to set the transport, and this fixes my issue locally. Would you mind reviewing my diff and consider integrating it with the mainline?