gitignore
This commit is contained in:
parent
b23320c288
commit
435b4c61d3
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
dwshttp
|
2
main.go
2
main.go
@ -110,6 +110,7 @@ func ParseHTTPRequest(b []byte) (HTTPRequest, error) {
|
|||||||
ret.StartLine.RequestTarget = string(rt[:])
|
ret.StartLine.RequestTarget = string(rt[:])
|
||||||
|
|
||||||
_, hv, br := ReadBytesUntil(b, '\r')
|
_, hv, br := ReadBytesUntil(b, '\r')
|
||||||
|
b = br
|
||||||
if hv == nil {
|
if hv == nil {
|
||||||
return ret, errors.New("could not find http version in request")
|
return ret, errors.New("could not find http version in request")
|
||||||
}
|
}
|
||||||
@ -169,7 +170,6 @@ func ParseHTTPRequest(b []byte) (HTTPRequest, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse Message Body
|
// Parse Message Body
|
||||||
|
|
||||||
// Message body if it exists
|
// Message body if it exists
|
||||||
if _, ok := ret.Headers["Transfer-Encoding"]; ok {
|
if _, ok := ret.Headers["Transfer-Encoding"]; ok {
|
||||||
if _, okc := ret.Headers["Content-Length"]; okc {
|
if _, okc := ret.Headers["Content-Length"]; okc {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user