Skip to content
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

Header Expect: 100-continue #221

Open
lbilli opened this issue Mar 25, 2023 · 0 comments
Open

Header Expect: 100-continue #221

lbilli opened this issue Mar 25, 2023 · 0 comments

Comments

@lbilli
Copy link

lbilli commented Mar 25, 2023

I recently started having problems with POST requests to a particular server.
The issue wasn't happening in the past but I'm not sure whether this failure was
triggered by an update on my end or the remote server has changed behavior.

My current setup is Julia 1.9.0-rc1.

What happens is that POST requests to this particular server done with Downloads.request()
fail whereas the same requests sent with the command line curl or R package curl
(both linked to libcurl 7.88.1) or even Firefox succeed.

After a bit of a struggle I was able to find out that Julia's Downloads / LibCURL silently inject
the header Expect: 100-continue in the request, which seems to be what confuses the server.

By adding the header "Expect" => nothing, which effectively disable the header,
all is working again.

Interestingly, neither curl (at least version 7.88.1) nor the browser add this header and so
I wonder why the different default behavior.

On a side note, in order to diagnose this issue, http echo servers like httpbin.org are of no use
as they do not report this particular header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant