From 435b4c61d33956f9979b7a1c11bc61d3ae74ecfb Mon Sep 17 00:00:00 2001 From: Tanishq Dubey Date: Tue, 16 Jul 2024 13:22:46 -0400 Subject: [PATCH] gitignore --- .gitignore | 1 + main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b7f4a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dwshttp diff --git a/main.go b/main.go index 45dadcd..b4e65cb 100644 --- a/main.go +++ b/main.go @@ -110,6 +110,7 @@ func ParseHTTPRequest(b []byte) (HTTPRequest, error) { ret.StartLine.RequestTarget = string(rt[:]) _, hv, br := ReadBytesUntil(b, '\r') + b = br if hv == nil { return ret, errors.New("could not find http version in request") } @@ -169,7 +170,6 @@ func ParseHTTPRequest(b []byte) (HTTPRequest, error) { } // Parse Message Body - // Message body if it exists if _, ok := ret.Headers["Transfer-Encoding"]; ok { if _, okc := ret.Headers["Content-Length"]; okc {