Skip to content

http: use header_has_value() instead of duplicate code#21302

Closed
bagder wants to merge 4 commits into
masterfrom
bagder/has-value
Closed

http: use header_has_value() instead of duplicate code#21302
bagder wants to merge 4 commits into
masterfrom
bagder/has-value

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Apr 13, 2026

No description provided.

@github-actions github-actions Bot added the HTTP label Apr 13, 2026
@bagder bagder force-pushed the bagder/has-value branch from fb7c8d8 to aac5190 Compare April 14, 2026 05:45
@bagder bagder marked this pull request as ready for review April 14, 2026 05:47
@bagder bagder requested a review from Copilot April 14, 2026 05:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors HTTP header parsing in lib/http.c to avoid duplicated logic by introducing a shared helper.

Changes:

  • Added header_has_value() helper to centralize header-name/value parsing and trimming.
  • Updated http_header_is_empty() and copy_custom_value() to use the new helper.

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

Comment thread lib/http.c Outdated
Comment thread lib/http.c Outdated
bagder and others added 2 commits April 14, 2026 08:01
language

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
indent

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bagder bagder closed this in def4d89 Apr 14, 2026
@bagder bagder deleted the bagder/has-value branch April 14, 2026 08:17
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