u-boot/test/cmd
Mikhail Kshevetskiy ece1631f5e 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>
2024-12-28 11:59:42 -06:00
..
addrmap.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
armffa.c test: Rename UTF_CONSOLE_REC to UTF_CONSOLE 2024-08-26 18:51:49 -06:00
bdinfo.c lmb.c: add missing comma in lmb_dump_region() 2024-11-14 18:14:06 -06:00
cmd_ut_cmd.c test: Add a new suite for commands 2023-12-13 18:39:04 -05:00
command.c test: Update command test to use unit-test functions 2024-11-13 11:56:01 -06:00
coreboot.c x86: coreboot: Allow building an expo for editing CMOS config 2024-11-03 21:27:12 -06:00
cpuid.c x86: Add a cpuid command 2024-10-18 14:10:21 -06:00
exit.c test: Tidy up checking for console end 2024-08-26 18:51:49 -06:00
fdt.c test: Tidy up checking for console end 2024-08-26 18:51:49 -06:00
font.c coreboot: Switch to a monospaced font 2024-10-18 14:10:21 -06:00
hash.c test: cmd/hash: check return value of ut_check_console_line 2024-11-18 19:10:56 -06:00
history.c test: Rename UTF_CONSOLE_REC to UTF_CONSOLE 2024-08-26 18:51:49 -06:00
loadm.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
Makefile Merge patch series "cmd: hash: correct parameter count check" 2024-11-14 10:49:51 -06:00
mbr.c test: use %zd for size_t in mbr_test_run() 2024-11-14 18:14:06 -06:00
mem.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
mem_copy.c test/cmd/mem_copy.c: Use CONFIG_SYS_LOAD_ADDR for base 2024-11-01 13:37:25 -06:00
mem_search.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
meminfo.c meminfo: Show the lmb records 2024-10-25 14:22:24 -06:00
msr.c x86: Add msr command 2024-10-18 14:10:21 -06:00
pci_mps.c test: Rename UTF_CONSOLE_REC to UTF_CONSOLE 2024-08-26 18:51:49 -06:00
pinmux.c Merge patch series "Tidy up console recording in tests" 2024-08-26 18:52:18 -06:00
pwm.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
rw.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
seama.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
setexpr.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
temperature.c test: cmd: Drop unnecessary console_record_reset_enable() 2024-08-26 18:51:49 -06:00
test_echo.c test: Tidy up checking for console end 2024-08-26 18:51:49 -06:00
test_pause.c test: Tidy up checking for console end 2024-08-26 18:51:49 -06:00
wget.c test/cmd/wget: replace bogus response with an actual response from the HTTP server 2024-12-28 11:59:42 -06:00