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

Gor can't correctly forward POST request including "Expect: 100-continue" #77

Closed
Dieken opened this issue Feb 11, 2014 · 5 comments
Closed

Comments

@Dieken
Copy link

Dieken commented Feb 11, 2014

$ curl 'http://xxxx/'  -d @some-file -v

cURL sends normal HTTP headers including "Content-Length: nnnnn" and extra HTTP header "Expect: 100-continue" but empty request body, the http server responses
"100 Continue" then cURL sends the request body.

This is valid HTTP request and I verified the http server feature in Go 1.2 net/http package can handle it correctly, but Gor fails, its input-http plugin wrongly thinks the empty http body is invalid.

@Dieken
Copy link
Author

Dieken commented Feb 13, 2014

input_raw plugin gets two byte arrays from the channel, one is the http header, one is the http body, output_http plugin fails to parse those two byte arrays into two http requests, no good idea to fix it yet.

@buger
Copy link
Owner

buger commented Feb 13, 2014

Yes, right now it support only simple queries, keep-alive and 100 continue is not so easy to implement.

@Dieken
Copy link
Author

Dieken commented Feb 13, 2014

thanks for your clarification! I'll try another tool tcpcopy (https://github.com/wangbin579/tcpcopy, @wangbin579) although tcpcopy is harder to use.

btw, just find curl only uses 'Expect: 100-continue' for big payload, I tried 8KB README.md in Gor's source tree, this tip may be useful for your test in the future:-)

@buger
Copy link
Owner

buger commented Jun 29, 2015

Fixed by #158

@buger buger closed this as completed Jun 29, 2015
@buger
Copy link
Owner

buger commented Aug 11, 2016

@Dieken happy to announce that keep-alive is supported in just released v0.15.0 version (and lot of 100-continue fixes as well).

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

2 participants