ebarlas / microhttp

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

Address warnings #9

Closed beatngu13 closed 2 years ago

beatngu13 commented 2 years ago

This PR addresses some (IMHO justified) IntelliJ IDEA warnings. Feel free to throw away specific commits if you don't the like the corresponding changes.

Side question: Is there a reason why you use CRLF instead of LF in Response and RequestParser?

ebarlas commented 2 years ago

I didn't like the appearance of the raw requests with \r but without \n. The asymmetry bothered me. But looking again, I think the absence of noisy double quotes outweighs that slightly.

CRLF is used throughout the HTTP/1.1 spec (RFC 2616), so it feels like a standard, familiar shorthand.

beatngu13 commented 2 years ago

CRLF is used throughout the HTTP/1.1 spec (RFC 2616)

Oh, OK. Didn't know that. 👍