8000 Problem with gRPC over HTTP2 · Issue #17122 · curl/curl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Problem with gRPC over HTTP2 #17122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
8000
epicmkirzinger opened this issue Apr 21, 2025 · 2 comments
Closed

Problem with gRPC over HTTP2 #17122

epicmkirzinger opened this issue Apr 21, 2025 · 2 comments
Assignees

Comments

@epicmkirzinger
Copy link

I did this

Make a HTTP/2 request with the TE request header set to "trailers". The TE request header is stripped from the request, not sent to the remote server.

I expected the following

The TE request header is not stripped.

Note that gRPC over HTTP2 requires that the TE header is set to "trailers". According to rfc9113, the TE header may be present, but must have a value of "trailers". 4e15605 strips it unconditionally instead of if the value is not equal to "trailers".

curl/libcurl version

8.12.1

operating system

Windows 10

@pkropachev
Copy link
Contributor

The TE header in HTTP/2 has a more limited use.

https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.2

The only exception to this is the TE header field, which MAY be present in an HTTP/2 request; when it is, it MUST NOT contain any value other than "trailers".

https://nghttp2.org/documentation/programmers-guide.html

HTTP/2 prohibits connection-specific header fields. The following header fields must not appear: "Connection", "Keep-Alive", "Proxy-Connection", "Transfer-Encoding" and "Upgrade". Additionally, "TE" header field must not include any value other than "trailers".

So, TE header should not be stripped for HTTP/2.

icing added a commit to icing/curl that referenced this issue Apr 22, 2025
A "TE" request header is allowed in HTTP/2 when it only carries the "trailers"
value. RFC 9113 ch. 8.2.2. Check client supplied TE values for the "trailers"
token and only pass that one in a HTTP/2 request.

Add test_01_17 to verify.

refs curl#17122
@icing
Copy link
Contributor
icing commented Apr 22, 2025

Thanks for the report. I made #17128 to correct this.

@icing icing self-assigned this Apr 22, 2025
@bagder bagder closed this as completed in 1d66a76 Apr 22, 2025
nbaws pushed a commit to nbaws/curl that referenced this issue Apr 26, 2025
A "TE" request header is allowed in HTTP/2 when it only carries the
"trailers" value. RFC 9113 ch. 8.2.2. Check client supplied TE values
for the "trailers" token and only pass that one in a HTTP/2 request.

Add test_01_17 to verify.

Fixes curl#17122
Reported-by: epicmkirzinger on github
Closes curl#17128
nbaws pushed a commit to nbaws/curl that referenced this issue Apr 26, 2025
A "TE" request header is allowed in HTTP/2 when it only carries the
"trailers" value. RFC 9113 ch. 8.2.2. Check client supplied TE values
for the "trailers" token and only pass that one in a HTTP/2 request.

Add test_01_17 to verify.

Fixes curl#17122
Reported-by: epicmkirzinger on github
Closes curl#17128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants
0