Conversation
Resume the chunked upstream body after preview with H2StreamFromChunkedTransfer, so trailer reading is covered by the same idle check loop, and drop the separate http trailer recv timeout. Co-authored-by: Cursor <cursoragent@cursor.com>
…imeout Only skip preview when the upstream chunked body is still at a chunk boundary, otherwise keep reading under the idle checker, as the partial consumed chunk encoding can not be resent by a fresh chunked transfer. Co-authored-by: Cursor <cursoragent@cursor.com>
The trailer of the adapted http body from the ICAP server was limited to 128 bytes, which made the ICAP connection not reusable for larger ones. Co-authored-by: Cursor <cursoragent@cursor.com>
The body is always forwarded as chunked if the h2/h3 stream has one, so session based auth should not make body_type() return None. This keeps it consistent with the h2_to_h1 reqmod adapter, which uses the stream end. Co-authored-by: Cursor <cursoragent@cursor.com>
So the ICAP adapters can use the small body path when the body size is exactly the preview size, like the h1 ones, instead of a preview request and an extra 100-continue round trip. Co-authored-by: Cursor <cursoragent@cursor.com>
HTTP/2 forbids connection-specific headers, so an ICAP response with Upgrade or Proxy-Connection or headers listed on Connection would make the h2 send fail. Filter them in adapted h2 request/response and in the adapter error response sent to h2 clients. Co-authored-by: Cursor <cursoragent@cursor.com>
The preview data, including the part left over for the following body transfer, is buffered locally, so release the flow control capacity for it, or the stream will stall if the preview size is not less than the stream window. Co-authored-by: Cursor <cursoragent@cursor.com>
- accept 'req-hdr=0, res-hdr=X, res-body/null-body=Y' in RESPMOD responses, and skip the returned http request header - use checked parsing for the byte offsets and reject empty values - limit the encapsulated http header size by the ICAP max header size Co-authored-by: Cursor <cursoragent@cursor.com>
- use InvalidResponse/UnknownResponse instead of the AfterContinue variants on non-preview respmod paths, and move the code check out of the h2 and h1_to_h2 bidirectional helpers to the callers, as reqmod and respmod h1 do - report ICAP-RESPMOD-206 instead of ICAP-REQMOD-206 in respmod preview - remove duplicated NoPayload check in respmod h2 forward_header Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
No description provided.