Skip to content

http: return OOM errors from hsts properly - #19862

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/http-hsts
Closed

http: return OOM errors from hsts properly#19862
bagder wants to merge 1 commit into
masterfrom
bagder/http-hsts

Conversation

@bagder

@bagder bagder commented Dec 7, 2025

Copy link
Copy Markdown
Member

When Curl_hsts_parse() fails with out of memory, return it to parent.

When Curl_hsts_parse() fails with out of memory, return it to parent.
@github-actions github-actions Bot added the HTTP label Dec 7, 2025
@bagder
bagder marked this pull request as ready for review December 7, 2025 11:38
@bagder
bagder requested a review from Copilot December 7, 2025 11:38
@bagder

bagder commented Dec 7, 2025

Copy link
Copy Markdown
Member Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes error handling in HTTP header parsing to properly propagate out-of-memory (OOM) errors from HSTS header parsing. When Curl_hsts_parse() encounters a memory allocation failure, the error is now returned to the caller instead of being logged and ignored. This aligns with the existing error handling pattern used for other authentication parsers (NTLM, Digest) in the same file.

  • Adds early return for CURLE_OUT_OF_MEMORY errors from Curl_hsts_parse()
  • Preserves existing behavior for non-OOM parsing errors (logged but not fatal)
  • Follows established codebase pattern for critical error propagation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in a3f4fd2 Dec 7, 2025
@bagder
bagder deleted the bagder/http-hsts branch December 12, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants