Skip to content

feat: add HttpRequest::hasBody() - #1935

Open
Soundcreates wants to merge 1 commit into
uNetworking:masterfrom
Soundcreates:fix/end-without-body-head
Open

feat: add HttpRequest::hasBody()#1935
Soundcreates wants to merge 1 commit into
uNetworking:masterfrom
Soundcreates:fix/end-without-body-head

Conversation

@Soundcreates

Copy link
Copy Markdown

Closes #1910.

Add HttpRequest::hasBody() so request handlers can determine whether the request declares a body before registering an onData handler.

The helper recognizes both Content-Length and Transfer-Encoding, matching the parser's body-selection logic. Tests cover requests with and without a declared body.

Validation:

  • make -C tests default
  • AddressSanitizer enabled by the test target

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.

Method to indicate that request has body

1 participant