Skip to content

Commit 91455a9

Browse files
committed
Apply a few recent changes from the wire guide on grpc.io.
1 parent 12056f1 commit 91455a9

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

doc/PROTOCOL-HTTP2.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Request-Headers are delivered as HTTP2 headers in HEADERS + CONTINUATION frames.
2424
* **Call-Definition** → Method Scheme Path TE [Authority] [Timeout] Content-Type [Message-Type] [Message-Encoding] [Message-Accept-Encoding] [User-Agent]
2525
* **Method** → ":method POST"
2626
* **Scheme** → ":scheme " ("http" / "https")
27-
* **Path** → ":path" {_path identifying method within exposed API_}
27+
* **Path** → ":path" "/" Service-Name "/" {_method name_}
28+
* **Service-Name** → {_IDL-specific service name_}
2829
* **Authority** → ":authority" {_virtual host name of authority_}
2930
* **TE** → "te" "trailers" # Used to detect incompatible proxies
3031
* **Timeout** → "grpc-timeout" TimeoutValue TimeoutUnit
@@ -51,6 +52,13 @@ Request-Headers are delivered as HTTP2 headers in HEADERS + CONTINUATION frames.
5152

5253
HTTP2 requires that reserved headers, ones starting with ":" appear before all other headers. Additionally implementations should send **Timeout** immediately after the reserved headers and they should send the **Call-Definition** headers before sending **Custom-Metadata**.
5354

55+
Some gRPC implementations may allow the **Path** format shown above
56+
to be overridden, but this functionality is strongly discouraged.
57+
gRPC does not go out of its way to break users that are using this kind
58+
of override, but we do not actively support it, and some functionality
59+
(e.g., service config support) will not work when the path is not of
60+
the form shown above.
61+
5462
If **Timeout** is omitted a server should assume an infinite timeout. Client implementations are free to send a default minimum timeout based on their deployment requirements.
5563

5664
**Custom-Metadata** is an arbitrary set of key-value pairs defined by the application layer. Header names starting with "grpc-" but not listed here are reserved for future GRPC use and should not be used by applications as **Custom-Metadata**.
@@ -238,10 +246,10 @@ If a detectable connection failure occurs on the client all calls will be closed
238246

239247
### Appendix A - GRPC for Protobuf
240248

241-
The service interfaces declared by protobuf are easily mapped onto GRPC by code generation extensions to protoc. The following defines the mapping to be used
242-
249+
The service interfaces declared by protobuf are easily mapped onto GRPC by
250+
code generation extensions to protoc. The following defines the mapping
251+
to be used.
243252

244-
* **Path** → / Service-Name / {_method name_}
245253
* **Service-Name** → ?( {_proto package name_} "." ) {_service name_}
246254
* **Message-Type** → {_fully qualified proto message name_}
247255
* **Content-Type** → "application/grpc+proto"

0 commit comments

Comments
 (0)