Incorrect http re-assembly
Closed this issue · 3 comments
trace_indexes_from_client_go.pcap.zip
Attached is pcap file that is incorrectly re-assembled into http stream.
As seen in this screenshot, the body of DELETE request is not correct:
To make sure it's not a bad pcap file, I looked at packets using http://www.tastycocoabytes.com/cpa/.
This is how body of the request should look like:
I used netgraph -input-pcap trace_indexes_from_client_go.pcap
I think https://github.com/ga0/netgraph/blob/master/ngnet/httpstream.go#L74 might be an issue.
It merely sends r for processing.
According to https://godoc.org/github.com/google/gopacket/tcpassembly#Stream, []Reassembly slice will be re-used, so probably should make a copy of r before sending.
Thank you for posting this issue!
I'll try to solve it.