Comments (10)
I released new version, pls check it https://github.com/buger/gor/releases/tag/0.7.5
from goreplay.
The problem is still there, but the error is different.
from goreplay.
For some request, I remove "Expect: 100-continue" from http header, and it works. So I guess perhaps Go's http library does not support "Expect: 100-continue". Is that a bug?
from goreplay.
I believe what you are seeing here is the tail end of a post that has already had most of the request sent. Basically the listener thinks the message is complete and sends it to the replay, then the listener gets more packets from the message which has already been shipped and then forwards that message to the replay.
from goreplay.
There were some changes in recent v0.8.4 which may help
from goreplay.
This is my first time posting here and I just want to congratulate you on this excellent piece of software. Its been working great for us. This is the first issue we've experienced with it so far.
I've still observed this issue in the 0.8.4 release. I run gor as follows :
sudo gor --input-raw :8080 --output-http xxx:8080 --output-http-method POST
The replay breaks on the following conversation.
POST /some/path HTTP/1.1
Content-Type: application/xml
Content-Length: xxx
Host: xxx:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.0.3 (java 1.5)
Expect: 100-Continue
HTTP/1.1 100 Continue
<?xml version="1.0" encoding="UTF-8"?>
<X></X>
HTTP/1.1 200 OK
Content-Length: 0
Date: Wed, 10 Sep 2014 09:29:44 GMT
Server: Apache
The following errors are outputted by gor.
2014/09/10 09:00:46 Request error: Post http://xxx:8080/some/path: unexpected EOF
2014/09/10 09:00:46 Cannot parse request <?xml version="1.0" encoding="UTF-8"?>
<X></X> malformed HTTP version "encoding=\"UTF-8\"?>"
The 'Expect: 100-Continue' header is used by clients to give the server a chance to reject the request before the client goes to the trouble of sending the request body. It's normally used when the request body is large. The client sends the request headers including 'Expect: 100-Continue'. If it gets a 'HTTP/1.1 100 Continue' back it knows it's then good to send on the request body. http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3
It looks as though gor's request parsing does not understand this header. For the first part of the conversation it expects to find a request body. It doesn't find anything so outputs the error 'unexpected EOF'. For the second part of the conversation it expects a HTTP version header, but instead finds a request body.
from goreplay.
It looks like output_http just delegates the request parsing to http://golang.org/pkg/net/http/#ReadRequest which does not have any special handling of this header.
from goreplay.
Yeah, its pretty simple parser right now...
from goreplay.
OK. Thanks. I see there is another issue for this #77 where you mention that handling this isn't so straightforward. I didn't see this earlier.
from goreplay.
@stephencurran @TigerMee well, it took a while, but now it should fixed by #158
from goreplay.
Related Issues (20)
- [Question]: How do I use the --input-raw-max-wait parameter HOT 1
- Can GoReplay capture HTTPS traffic in port 443? HOT 1
- how to know the host when replay to multiple env
- is this support mirror traffic audio streaming request?
- [Question]: What does goreplay mean by what it records into the file
- Are PRO and Enterprise Version still available? HOT 1
- –http-original-host parameter does not take effect HOT 2
- could goreplay record SIP (Session initialization Protocol)?
- File format description is outdated HOT 1
- Goreplay was unable to read Solr requests after a certain length. HOT 4
- Request Rewriting not working as expected with regex HOT 2
- I want to stop forwarding of a specific request path HOT 2
- Is there a version that supports REHL5.7 HOT 1
- The response body is truncated HOT 3
- Goreplay not capturing actual user traffic that’s reaching varnish (port: 8983) HOT 16
- ~25% of Requests are not captured by goreplay when compared with production HOT 6
- TCP replay not working. HOT 1
- (question) When will goreplay release new version? HOT 2
- The response payload string is also cut in half
- Middleware Replay Events Not Triggering Correctly with Rate Limiting in Gor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goreplay.