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

Conditionally apply a timeout rather than a maximum count of interim responses #141

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

notroj
Copy link
Owner

@notroj notroj commented Jan 27, 2024

Rather than appling a maximum count, apply an overall timeout to
reading interim responses to match the read timeout, if a read timeout is configured and the NE_SESSFLAG_1XXTIMEOUT flag is set - which defaults to set (issue #94):

* src/ne_session.h (NE_SESSFLAG_1XXTIMEOUT): New flag.

* src/ne_session.c (ne_session_create): Set NE_SESSFLAG_1XXTIMEOUT to default on.

* src/ne_request.c (send_request): Use the session read timeout to avoid looping reading interim responses indefinitely, rather than hard-coding a maximum number of responses.

* test/request.c (fail_request_with_error): Set read timeout. (fail_excess_1xx): Adjust expected error, send more interim responses.

reading interim responses to match the read timeout, if a read timeout
is configured and the NE_SESSFLAG_1XXTIMEOUT flag is set - which
defaults to set (issue #94):

* src/ne_session.h (NE_SESSFLAG_1XXTIMEOUT): New flag.

* src/ne_session.c (ne_session_create): Set NE_SESSFLAG_1XXTIMEOUT to
  default on.

* src/ne_request.c (send_request): Use the session read timeout to
  avoid looping reading interim responses indefinitely, rather than
  hard-coding a maximum number of responses.

* test/request.c (fail_request_with_error): Set read timeout.
  (fail_excess_1xx): Adjust expected error, send more interim
  responses.
@notroj notroj changed the title Conditionally a timeout rather than a maximum count of interim responses Conditionally apply a timeout rather than a maximum count of interim responses Jan 27, 2024
@notroj notroj merged commit 2ce607d into master Jan 27, 2024
196 checks passed
@notroj notroj deleted the interim-timeout branch January 27, 2024 12:32
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