curlie
curlie copied to clipboard
fix headers/body order in console
Normally curlie returns output like that (as expected):
[mateusz@arch curlie (fix)]$ curlie localhost:8080
HTTP/1.1 200 OK
Date: Fri, 20 May 2022 19:35:04 GMT
Content-Length: 30
Content-Type: text/plain; charset=utf-8
Hello
Hello
Hello
Hello
Hello
But sometimes it returns like so: (around 5% of responses)
[mateusz@arch curlie (fix)]$ curlie localhost:8080
Hello
Hello
Hello
Hello
Hello
HTTP/1.1 200 OK
Date: Fri, 20 May 2022 19:35:40 GMT
Content-Length: 30
Content-Type: text/plain; charset=utf-8
For me it only happens when querying localhost (probably because of the low latency??). This PR fixes it.