Skip to content

Conversation

@benoitc
Copy link
Owner

@benoitc benoitc commented Jan 19, 2026

Summary

  • Adds inform_fun option for handling HTTP 1xx informational responses per RFC 7231 Section 6.2
  • For sync requests: inform_fun(Status, Reason, HeadersList) callback is invoked
  • For async requests: {hackney_response, AsyncRef, {informational, Status, Reason, Headers}} message sent to stream_to process
  • If no callback is set, 1xx responses are silently skipped (per HTTP spec)
  • Parser now correctly returns 1xx responses instead of treating them as junk

This enables use cases like HTTP 103 Early Hints for preloading resources.

Closes #631

@benoitc benoitc force-pushed the fix/631-http-inform-1xx branch from 93f69df to 59fbe43 Compare January 19, 2026 12:16
@benoitc
Copy link
Owner Author

benoitc commented Jan 19, 2026

/rerun

Add support for HTTP 1xx informational responses per RFC 7231 Section 6.2.

- Add `inform_fun` option to receive callbacks when 1xx responses arrive
- For sync requests: callback(Status, Reason, HeadersList) is invoked
- For async requests: `{hackney_response, AsyncRef, {informational, Status, Reason, Headers}}`
  message is sent to stream_to process
- If no callback is set, 1xx responses are silently skipped
- Parser now returns 1xx responses instead of treating them as junk

This enables use cases like HTTP 103 Early Hints for preloading resources.
@benoitc benoitc force-pushed the fix/631-http-inform-1xx branch from 59fbe43 to f5ef2bd Compare January 19, 2026 12:24
@benoitc benoitc merged commit fd75c69 into master Jan 19, 2026
5 checks passed
@benoitc benoitc deleted the fix/631-http-inform-1xx branch January 19, 2026 12:35
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.

HTTP inform not supported

2 participants