Go to file
Javier Sánchez Parra 7940887068 #1000 Fix HTTP request header length parsing
OgClient miscalculates the body size of the request.

ogServer delimits HTTP headers with "\r\n\r\n" to comply with RFC 2616.
But ogClient searches for the first "\r\n" delimiter, hence, ogClient
stops at the first HTTP header field instead of at the end of the header.
Hence, it incorrectly assumes the body starts after the first "\r\n".

This commit updates ogClient to search for the "\r\n\r\n" delimiter.

Example:

POST /shell/run HTTP/1.1\r\n <-- ogClient considers body starts here (WRONG!)
Content-Length: 952\r\n
Content-Type: application/json\r\n
\r\n                         <-- Here is where the body starts
{"json-body":...}
2021-07-13 14:07:57 +02:00
cfg Rename 'linux' mode to 'live' mode 2020-06-05 14:55:10 +02:00
src #1000 Fix HTTP request header length parsing 2021-07-13 14:07:57 +02:00
tests ogClient is AGPLv3+ 2021-05-14 00:19:28 +02:00
.gitignore Create new ogClient 2020-01-19 19:50:44 +01:00
COPYING Rename LICENSE to COPYING 2020-06-18 16:45:46 +02:00
ogclient ogClient is AGPLv3+ 2021-05-14 00:19:28 +02:00
setup.py Rename 'linux' folder and operations to 'live' 2020-12-03 13:38:43 +01:00