summaryrefslogtreecommitdiff
path: root/net/tcp.c
diff options
context:
space:
mode:
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>2024-12-28 13:46:34 +0300
committerTom Rini <trini@konsulko.com>2024-12-28 11:59:42 -0600
commitece1631f5e1d12477a9fd439570a3f05e4e8fb1e (patch)
tree2515083301f67fcf28f878c110d54c1161e35009 /net/tcp.c
parentfa3ae38b837e24d468b59f0c96b8172f47ba0ceb (diff)
test/cmd/wget: replace bogus response with an actual response from the HTTP server
According to HTTP/1.0 standard the HTTP reply consist of * Status Line + CRLF * Zero or more Response Header Fields (each ended with CRLF) * CRLF on new line (Response Header Fields end marker) * Optional Entity Body. Thus in response headers we state: Content-Length = 30 but actual transferred file data is: "\r\n<html><body>Hi</body></html>\r\n". This is 32 bytes of data. So we get and check for correctness 32 bytes of data, but * The response we are used is incorrect, real server will set Content-Length to 32. * default_wget_info->hdr_cont_len will be set to wrong value 30 (used for efi http booting). Fix an issue by: * replace bogus response with an actual response from the HTTP server * format response to show HTTP response structure * recalculate md5sum as transferred file data has been changed. The server response was captured with the commands echo -ne "<html><body>Hi</body></html>\n" > ~/public_html/test.html echo -ne "GET /~${USER}/test.html HTTP/1.0\r\n\r\n" | netcat localhost 80 >reply.txt Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Diffstat (limited to 'net/tcp.c')
0 files changed, 0 insertions, 0 deletions