ebarlas / microhttp

Fast, scalable, self-contained, single-threaded Java web server
MIT License
539 stars 54 forks source link

fix get request null body #28

Closed kishoreravi24 closed 11 months ago

kishoreravi24 commented 11 months ago

The issue lies in the logic of handling requests without a content-length header or chunked transfer encoding. If neither of these headers is present, the code sets the state to DONE, which results in a null value for the request body.

This modification ensures that if neither the content-length header nor the chunked encoding header is present, the request's state is set to DONE, and the content length is explicitly set to zero to indicate that there is no body content in the request.

kishoreravi24 commented 11 months ago

will fix this - #27