Add --ignore-length handling
Closes #439 (closed)
Design
- Set an integer
response_ignorelength
inwget_request
when --ignore-length is passed by the user. - While downloading the body, check for
response_ignorelength
- If
response_ignorelength
is set, download until there is data. (method 3 in wget_http_get_response_cb`) - When
response_ignorelength
is not set, and size of data downloaded is inconsistent withContent-Length
, exit with WGET_EXIT_INCONSISTENT_LENGTH (this is used in the test-suite).
Possible Flaws
None.
Approver's checklist:
-
The author has submitted the FSF Copyright Assignment and is listed in AUTHORS -
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent with existing code -
This feature/change has adequate documentation added (if appropriate) -
No obvious mistakes / misspelling in the code
Edited by Archit Pandey