Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new callback for handling interim (1xx) responses #127

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

notroj
Copy link
Owner

@notroj notroj commented Oct 22, 2023

No description provided.

@notroj notroj force-pushed the interim-callback branch 2 times, most recently from f18637a to 18cf23c Compare October 22, 2023 16:24
* src/ne_request.c (read_response_headers): Take clear argument and
  conditionally clear the response header hash here.
  (discard_headers): Remove function.
  (ne_add_interim_handler): New function.
  (send_request): Read interim response headers rather than discarding
  and invoke the interim handlers for each 1xx response.
  (ne_begin_request): No longer clear response header hash here.
  (ne_end_request): Don't clear response header hash here.
  (ne_request_destroy): Free interim handlers.

* test/request.c (test_interim, interims): Add new test.

* test/common/tests.h (ONCMPN): Add new macro.
  single wrapper.
  (response_headers): Factored out from header tests.  Test that
  reading trailers doesn't reset the main request and that merging
  between the two works.
@notroj notroj merged commit b21f8ec into master Oct 23, 2023
192 checks passed
@notroj notroj deleted the interim-callback branch October 23, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant