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

Fix Expect: 100-continue requests and refactor chunked encoding #158

Merged
merged 2 commits into from
Jun 29, 2015

Conversation

buger
Copy link
Owner

@buger buger commented Jun 29, 2015

Expect: 100-continue

Requests with Expect: 100-continue use 2 tcp messages instead of 1: first waits for confirmation from server, second sends data.

Since Gor use simple TCP parser and assumption that every request should be send using single message, it did not worked.

I added special case, when it sees 100-continue request, it will wait for tcp message containing data, and will merge those messages (removing 100-continue request at all).

Chunked encoding handling moved to TCPMessage

Support for chunked encoding was added few days ago, but it worked inside HTTPOutput plugin.
I moved to TCPMessage, so it normalize all HTTP requests, and any output (including file), will see simple POST request without chunk encoding.

Other notes

  • I found that current TCP packet buffer is too small, and sometimes it cuts data, so i increased it.

Should fix #71 and #77

buger added a commit that referenced this pull request Jun 29, 2015
Fix Expect: 100-continue requests and refactor chunked encoding
@buger buger merged commit 04d7279 into master Jun 29, 2015
@slimus slimus deleted the fix-100-expect branch June 3, 2020 04:07
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.

Replay process can not tee some request with error "Can not parse request"
1 participant