Re: gRPC over HTTP2
Gregory Bourassa <[email protected]> Fri, 29 Mar 2024 15:45:01 -0700
| Newsgroups | gmane.comp.lang.smalltalk.vwnc |
|---|---|
| Message-ID | <[email protected]> |
Wireshark capture file attached for completeness.
BTW, the /Calibration/ListCalibrations procedure call has no input
argument (Empty in grpc-speak) and returns a list of strings. Pretty
simple proto3 definition of the following form:
=======================
syntax = "proto3";
import "google/protobuf/empty.proto";
message ListCalibrationsReply {
repeated string filenames = 1;
}
service Calibration {
rpc ListCalibrations (google.protobuf.Empty) returns
(ListCalibrationsReply);
}
========================
GB
On 3/29/24 15:33, Gregory Bourassa wrote:
> Hi folks,
>
> First, Happy Easter to one and all. :-)
>
> Is anyone connecting to gRPC services using HTTP/2?
>
> The HTTP/2 infrastructure in vw 9.x (9.3 specifically) works
> splendidly for accessing Web servers...but my request (POST) intended
> for a gRPC service appears not to be getting formatted the way it
> should: in particular, the header packing of HTTP/2 does not seem to
> be applied. The entire POST request shows up in a normal TCP PSH
> packet (wireshark screen shot below).
>
> Here is how I am setting up, and sending the request:
>
> request := Net.HttpRequest method: 'POST' url:
> 'https://urldefense.com/v3/__http://compass-ui-000951:20115__;!!DZ3fjg!-siMrhJBDGZJi9pHvJEmwv8M2zFSlh5wQizHH-JVp6GGV7Gf9uX3zXG6EQXl3GgKUv_bv6F5UppBLmrlcWhySoll$ '.
> request fieldValueAt: ':method' put: 'POST'.
> request fieldValueAt: ':scheme' put: 'http'.
> request fieldValueAt: ':path' put: '/Calibration/ListCalibrations'.
> request fieldValueAt: 'te' put: 'trailers'.
> request contentType: 'application/grpc+proto'.
> request fieldValueAt: 'user-agent' put: 'grpc-smalltalk-visualworks/9.3'.
> request contents: #[].
>
> client := HttpClient new.
> client useH2.
> response := client execute: request.
> client close.
>
> I would expect the request to be pre-processed for HTTP/2 such that
> the headers are packed with HPACK...but I see this in wireshark
> (attached screen grab).
>
> Anyone know what I am missing?
>
> Gregory Bourassa
>
GREGORY BOURASSA
Software Engineer
KEY TECHNOLOGY
Tel: +1 509 394 3260
[email protected]
grpcCapture.pcapng
(application/x-pcapng, 5.6 KB) - not displayed