]> git.kaiwu.me - nginx.git/commit
gRPC: special handling of the TE request header.
authorMaxim Dounin <mdounin@mdounin.ru>
Sat, 17 Mar 2018 20:04:25 +0000 (23:04 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Sat, 17 Mar 2018 20:04:25 +0000 (23:04 +0300)
commit6a0d9e5b2d9274e5ac5059a674763f19c2731b11
tree0ac81283fdacc0546598b4f47eae3bd99adfe82c
parent56ad960e7a3d4cf16c03ff231616a76c4834e548
gRPC: special handling of the TE request header.

According to the gRPC protocol specification, the "TE" header is used
to detect incompatible proxies, and at least grpc-c server rejects
requests without "TE: trailers".

To preserve the logic, we have to pass "TE: trailers" to the backend if
and only if the original request contains "trailers" in the "TE" header.
Note that no other TE values are allowed in HTTP/2, so we have to remove
anything else.
src/http/modules/ngx_http_grpc_module.c
src/http/ngx_http_request.c
src/http/ngx_http_request.h