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

Expect 100 Continue example/support? #783

Closed
mmacdermaid opened this issue Apr 17, 2020 · 2 comments · Fixed by #787
Closed

Expect 100 Continue example/support? #783

mmacdermaid opened this issue Apr 17, 2020 · 2 comments · Fixed by #787

Comments

@mmacdermaid
Copy link
Contributor

Does fasthttp actually support expect 100 continue workflow, or does it just automatically return the continue response and read the incoming body?

Not sure if this is the right section.
https://github.com/valyala/fasthttp/blob/master/server.go#L2036-L2067

There's a chance to further optimize my use case by reading the headers inside of my handler, and it would be nice to not process the bodies coming my direction.

If it does support the handling of the 100 continues, it would be great to see an example.

@erikdubbelboer
Copy link
Collaborator

fasthttp automatically handles Expect 100-continue and reads the incoming body. It currently doesn't have a callback or something that you could use to reject the body. This shouldn't be too hard to implement in the lines you linked. A pull request is always welcome 😄

@mmacdermaid
Copy link
Contributor Author

@erikdubbelboer 👍 I will see if I can come up with something if I get a second. I appreciate the response.

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 a pull request may close this issue.

2 participants