This repository was archived by the owner on Mar 15, 2018. It is now read-only.
Open
Conversation
Necessary for Google App Engine because net/http.DefaultClient is not available. Default behavior unchanged. Unit tests were failing so I didn't check with those.
fixes problems on GAE, whose http.Client implementation doesn't automatically extract the user portion of a URL as basic auth.
|
Can we get this merged in please? |
Author
|
I've been thinking about this; there is a minor problem. What if someone sets http.DefaultClient to the client supplied by GAE before every request? This would work before, but my patch caches the http.DefaultClient from stdlib and breaks that. I think it's better to set _httpClient to nil initially, then create an internal getter function. Something like: func getHttpClient() *http.Client {
if _httpClient == nil {
return http.DefaultClient
}
return _httpClient
}that should work transparently for people who don't read the docs and who don't expect this package to do anything GAE specific. (untested) |
Author
|
PS Im not using this project or its code atm anymore so I can't vouch for this modification; someone who is more into it feel free to make the change, run the tests and make a pull request to my branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ready to use on GAE platform.