goreplay icon indicating copy to clipboard operation
goreplay copied to clipboard

input_tcp: Limited request size

Open johanneswuerbach opened this issue 10 years ago • 4 comments

When separating listening and replaying as describe here: https://github.com/buger/gor#capture-traffic-from-port I see a lot of tcp connection: bufio.Scanner: token too long originating from here: https://github.com/buger/gor/blob/master/input_tcp.go#L70

Seems like golang Scanner can only buffer 64 * 1024 payloads https://golang.org/pkg/bufio/#pkg-constants

johanneswuerbach avatar Dec 14 '15 13:12 johanneswuerbach

I got the same problem.

hankl avatar Dec 23 '15 05:12 hankl

Middleware will exit from here: https://github.com/buger/gor/blob/master/middleware.go#L105

2015/12/24 13:50:04 output_http:1,0,1,77,15,2033 2015/12/24 13:50:09 output_http:1,0,1,72,14,2033 Traffic modifier command failed: bufio.Scanner: token too long 2015/12/24 13:50:23 output_http:0,0,0,0,0,2032 2015/12/24 13:50:28 output_http:0,0,0,0,0,2032

hankl avatar Dec 24 '15 07:12 hankl

I got the same issue, and I created a pull request with a fix. It's still pending.

As a workaround we filtered the gor capture file and removed any request larger than 64KiB. At least then the rest of the file will be replayed. Gist available at https://gist.github.com/sneakybeaky/eba26e585ac1f83301cc

sneakybeaky avatar Jan 13 '16 14:01 sneakybeaky

@johanneswuerbach this has been fixed in master. closing this. Thanks

salimane avatar Apr 24 '16 05:04 salimane