You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please specify the following versions when submitting a bug report:
Julia 1.7.3
HTTP.jl 1.3.1
MbedTLS.jl 1.1.3
We had an issue where our requests weren't working as expected. We eventually debugged the issue down to a bug in how we were specifying headers - we were accidentally passing headers = ["key", "value"] instead of headers = ["key" => "value"].
This means that we were accidentally passing two separate header strings, which were being interpreted as e.g. "key"[1] => "key"[2], or 'k'=>'e' and 'v'=>'a'. You can see this in action here:
Can we have this situation print an error instead? If you pass a header value that has more than 2 elements, can that be an error? And if you pass a header value that is of type String, can that be an error? E.g. can all of these situations be errors:
HTTP.request("GET", "http://example.com", headers=["hello"], verbose=3);
HTTP.request("GET", "http://example.com", headers=[(1,2,3,4,5), (2,3,4,5,6)], verbose=3);
HTTP.request("GET", "http://example.com", headers=[1, 2], verbose=3); # <-- this is already an error (since `1[2]` fails)
HTTP.request("GET", "http://example.com", headers=["hello", "world"], verbose=3);
Thank you! 😊
The text was updated successfully, but these errors were encountered:
Please specify the following versions when submitting a bug report:
We had an issue where our requests weren't working as expected. We eventually debugged the issue down to a bug in how we were specifying headers - we were accidentally passing
headers = ["key", "value"]
instead ofheaders = ["key" => "value"]
.This means that we were accidentally passing two separate header strings, which were being interpreted as e.g.
"key"[1] => "key"[2]
, or'k'=>'e'
and'v'=>'a'
. You can see this in action here:Can we have this situation print an error instead? If you pass a header value that has more than 2 elements, can that be an error? And if you pass a header value that is of type String, can that be an error? E.g. can all of these situations be errors:
Thank you! 😊
The text was updated successfully, but these errors were encountered: