Skip to content

Add --ignore-length handling

Archit Pandey requested to merge archit-p/wget2:add-ignore-length into master

Closes #439 (closed)

Design

  • Set an integer response_ignorelength in wget_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 with Content-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

Merge request reports