Skip to content

Added simulation of interrupting responses while sending response body in test server

What

As part of efforts to fix #447 (closed), I have implemented simulating interrupts of responses on the test server.

Config

wget_test_url_t {
  .interrupt_response_mode = INTERRUPT_RESPONSE_DURING_BODY or INTERRUPT_RESPONSE_DISABLE
  .interrupt_response_after_nbytes = 0...SIZE_MAX
}

How it works

  • When enabled, responses use MHD_create_response_from_callback with callback that returns status code MHD_CONTENT_READER_END_WITH_ERROR when interrupt_response_after_nbytes have been sent.

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 Tim Rühsen

Merge request reports