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

Cohttp-lwt: Send 100-continue on POST with Expect: 100-continue #979

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edwintorok
Copy link
Contributor

See RFC7231 section 5.1.1 on Expect 'Requirements for servers'.

I've tested this with Ezcurl-0.2.2 and a POST request which sends a 100-continue header.
Without this Curl will pause for 1s waiting for the server to send 100-continue. I also tested that inserting an artifical 10s sleep doesn't confuse curl (it gives up after 1s and sends the body anyway).

See Curl documentation on 100-continue and HTTP/1.1 RFC7231 5.1.1 Expect.

I've only implemented this for the Lwt backend for now.

See RFC7231 section 5.1.1 on Expect 'Requirements for servers'.

Signed-off-by: Edwin Török <[email protected]>
@mseri
Copy link
Collaborator

mseri commented Apr 4, 2023

Thanks a lot!

@mseri
Copy link
Collaborator

mseri commented Apr 4, 2023

Would it be possible to add it also to async?
And a test (if feasible). I think it should be easy to add in cohttp-lwt-unix test_sanity.ml.

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

Successfully merging this pull request may close these issues.

2 participants