Add create_repeater_tab_http2 for HTTP/2 targets#91
Open
humurabbi wants to merge 1 commit into
Open
Conversation
The existing create_repeater_tab tool only constructs HTTP/1.1
requests, which on HTTP/2 servers renders awkwardly in Repeater
(callers have to flip the Inspector view from HTTP/2 to HTTP/1.1 to
read the request cleanly). Modern web targets speak HTTP/2 by default,
so a dedicated HTTP/2 path avoids the friction.
This mirrors the send_http1_request / send_http2_request split:
* create_repeater_tab keeps the raw-content schema for HTTP/1.1
targets. Its description is updated to point clients at the new
HTTP/2 variant.
* create_repeater_tab_http2 takes pseudoHeaders + headers +
requestBody, the same schema as send_http2_request, so an LLM that
can already issue HTTP/2 requests can also park them in Repeater
without re-encoding.
The HTTP/2 header-list construction (pseudo-header ordering, lowercase
normalization, prepending of any missing :scheme/:method/:path/:
authority) is extracted into a buildHttp2HeaderList helper shared by
send_http2_request and create_repeater_tab_http2, so the two stay in
lock-step.
Adds a test that verifies create_repeater_tab_http2 dispatches an
HTTP/2 request to Repeater with the correct pseudo-header order and
lowercase regular headers.
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.
Summary
create_repeater_tab_http2: takespseudoHeaders+headers+requestBody(the same schema assend_http2_request) and constructs an HTTP/2 request viaHttpRequest.http2Request, then dispatches it to Repeater. Modern web targets default to HTTP/2 — the existingcreate_repeater_tabproduces a tab that has to be flipped from the Inspector's HTTP/2 view back to HTTP/1.1 to read cleanly, which is enough friction to encourage callers to skip Repeater entirely.buildHttp2HeaderList: the pseudo-header ordering (:scheme,:method,:path,:authority),:prefix normalization, and lowercase header conversion previously lived inline insend_http2_request. It's extracted sosend_http2_requestandcreate_repeater_tab_http2stay in lock-step.create_repeater_tabupdated to point at the HTTP/2 variant for modern targets. Schema unchanged.send_http1_request/send_http2_requestsplit — two narrow tools rather than one overloaded one.Test plan
./gradlew testpassescreate repeater tab http2 should build http2 requesttest verifies pseudo-header ordering, lowercase header names, body pass-through, and Repeater dispatchsend_http2_requesttests continue to pass (the inline header-construction path was refactored to call the new helper)Manual verification
create_repeater_tab_http2against an HTTP/2 host; the resulting Repeater tab renders natively in the Inspector's HTTP/2 view, no manual switching required.create_repeater_tabwith the updated description; the tool still constructs HTTP/1.1 requests as before.Note on dependencies
This PR is independent of #90 (the Site Map visibility / newline normalization change). They touch overlapping files but not overlapping lines.