pbrucla / reverse_proxy_group2

Group 2's Reverse Proxy Project - Spring 2024
0 stars 1 forks source link

Add HTTP/1.1 request parsing and validation in handleConnection function #1

Closed LLeon360 closed 4 months ago

LLeon360 commented 4 months ago

:)

epsteinmark commented 4 months ago

Good first start! You're most of the way there. Feel free to reach out if you need any help.

LLeon360 commented 4 months ago

Question: If I add newlines for legibility, I should probably change content-length which would mean that the response has a different content length but in the example on Discord, the content-length is the same. I'm currently adding CLRFs to the end of the response body and also adding to the content length. Is this correct?

epsteinmark commented 4 months ago

Question: If I add newlines for legibility, I should probably change content-length which would mean that the response has a different content length but in the example on Discord, the content-length is the same. I'm currently adding CLRFs to the end of the response body and also adding to the content length. Is this correct?

If you're referring to the content and response from Jason and Andrew respectively, then the content length should be the same because the body is the same. I should have clarified that you should add the newline to your write for errors. For instance (in the old PR I haven't looked at new one) your "Invalid request, Missing Content-Length header" didn't have a \n which made my terminal cursor appear on the same line which is unconventional.