-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP.request sidesteps a bit too much ? #463
Comments
I cannot assign @mattBrzezinski to this issue because he isn't a collaborator. |
First attempt: |
I spent a bit of time looking into a solution for this, and using your test case from above this does not seem to be an issue with (v1.1) pkg> add HTTP@0.8.1
julia> import Pkg; Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 22 entries:
...
"HTTP" => v"0.8.1"
...
julia> using HTTP
julia> uri = HTTP.URI("https://api.github.com");
julia> headers=Dict("User-Agent" => "HTTP.jl");
julia> HTTP.request("GET", uri; headers=headers)
ERROR: HTTP.ExceptionRequest.StatusError(403, "GET", "/", HTTP.Messages.Response:
"""
HTTP/1.0 403 Forbidden
Cache-Control: no-cache
Connection: close
Content-Type: text/html
Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.
""") It looks like this has been around for a while now, I'll spend some more time looking into this later this week. |
The change was made here to add a stack argument to |
What's the status here? @fredrikekre, is your PR ready to review? (it's currently marked as a draft). @mattBrzezinski, did you ever discover anything when you said you'd look into this? |
Yes, I think (something like) #469 would be good for the next breaking release, it is just too difficult to separata public API from internal API when everything is methods of the same function. |
Resolved in #789 |
This new method:
HTTP.jl/src/HTTP.jl
Line 316 in 7bcb6f5
HTTP.jl/src/HTTP.jl
Lines 306 to 314 in 7bcb6f5
headers
kwargs etc. But that does not happen, because we dispatch toHTTP.jl/src/RedirectRequest.jl
Line 18 in 7bcb6f5
headers
(it is included inkwargs...
).Here is an example, where
headers
is ignored:The text was updated successfully, but these errors were encountered: