Document HTTPHdr methods for #13420 review - #13422
Merged
Merged
Conversation
This adds doxygen comments for `HTTPHdr::length_get` and `HttpHDR::parse_req`.
HTTPHdr methods for #13420 review
Contributor
There was a problem hiding this comment.
Pull request overview
Adds/expands Doxygen documentation for HTTPHdr header serialization sizing and incremental HTTP/1.x request parsing APIs, improving the discoverability of these core header utilities in ATS’s proxy header layer.
Changes:
- Documented
HTTPHdr::length_get()to clarify what the serialized length includes/excludes. - Added detailed Doxygen comments for both
HTTPHdr::parse_req()overloads (raw buffer +IOBufferReader), including incremental parsing behavior, limits, and return values.
Comments suppressed due to low confidence (1)
include/proxy/hdrs/HTTP.h:674
- Same documentation consistency issue as the raw-buffer overload: prefer
@a <name>for parameter references in prose (instead of@p) and use@param[in]/@param[out]/@param[in,out]so direction is part of the Doxygen tag rather than embedded in the description. This matches other doxygenized headers ininclude/proxy/hdrs/.
* Reads and consumes data from @p r, parsing it into the header's request fields. Call
* repeatedly with the same @p parser until a result other than @c ParseResult::CONT is
* returned. When @c ParseResult::DONE is returned, the request method, URL, version, and
* header fields are set on this header.
*
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
bneradt
requested changes
Jul 23, 2026
bneradt
requested changes
Jul 23, 2026
Put brief sentence on opening line Use in/out/in,out parameter markers
bneradt
requested changes
Jul 23, 2026
bneradt
requested changes
Jul 23, 2026
bneradt
left a comment
Contributor
There was a problem hiding this comment.
Looks good. A couple other thoughts.
Clarify that `@` headers are also included in length
bneradt
approved these changes
Jul 23, 2026
bneradt
left a comment
Contributor
There was a problem hiding this comment.
Looks great. Thanks for working on this.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
include/proxy/hdrs/HTTP.h:689
- Same as the raw-buffer overload:
max_hdr_field_sizeis enforced asfield-name.size() + field-value.size()(excluding the:separator and CRLF), not the full serialized field line length. Updating the wording will make the limit semantics accurate.
* @param[in] max_request_line_size Maximum byte length of the request line; exceeding it returns
* @c ParseResult::ERROR.
* @param[in] max_hdr_field_size Maximum byte length of a single header field; exceeding it
* returns @c ParseResult::ERROR.
cmcfarlen
pushed a commit
to cmcfarlen/trafficserver
that referenced
this pull request
Jul 29, 2026
* Document HTTP methods for apache#13420 review * Make changes requested by Brian Neradt Put brief sentence on opening line Use in/out/in,out parameter markers Clarify that `@` headers are also included in length (cherry picked from commit e241265)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds doxygen comments for
HTTPHdr::length_getandHTTPdr::parse_req.