Quic Server request headers

60 views
Skip to first unread message

Garrett Wahlstedt

unread,
Nov 1, 2022, 3:25:59 PM11/1/22
to QUIC Prototype Protocol Discussion group
I have been working through the code for the quic_server and quic_client and I am trying to understand where the server initially decrypts and reads the request headers sent from the client (specifically the 'authority' and 'path'  headers). 

Additionally, if there is any documentation for the quic server and client specifically I would love to know where I can find it.

Thanks in advance

Nick Harper

unread,
Nov 1, 2022, 4:59:21 PM11/1/22
to proto...@chromium.org
Decrypting the packet and processing specific headers happen in different parts of the codebase. Handling those headers is done in https://source.chromium.org/chromium/chromium/src/+/main:net/third_party/quiche/src/quiche/quic/tools/quic_simple_server_stream.cc;l=327;drc=3ffc2f307ac29a2a3467237538e785af59bf1b12;bpv=1;bpt=1.

The best bet for documentation on quic_server and quic_client would be to run them with -h or --help, which should print out the command line flags for them.

--
You received this message because you are subscribed to the Google Groups "QUIC Prototype Protocol Discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proto-quic+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/proto-quic/6c0048a0-7d7b-433a-b5b5-166c13849f6cn%40chromium.org.

Garrett Wahlstedt

unread,
Nov 1, 2022, 5:24:00 PM11/1/22
to QUIC Prototype Protocol Discussion group, nha...@chromium.org
Thanks for the reply. I understand that the response headers are stored in the QuicSimpleServerStream object under the request_headers_ variable. I'm having trouble understanding where these response headers are set as a part of the stream receiving incoming data. Could you clarify that?

Thanks again

Nick Harper

unread,
Nov 1, 2022, 6:15:20 PM11/1/22
to Garrett Wahlstedt, QUIC Prototype Protocol Discussion group
The request_headers_ member variable gets filled in QuicSimpleServerStream::OnInitialHeadersComplete. In terms of the stream receiving incoming data, QuicStreamSequencer::OnStreamFrame would be a starting point to look at. You can use the crossreferences in codesearch to see where those functions get called or what they're calling into. It's unclear what your question is - there are multiple layers of abstraction that the bytes go through from being decrypted to processed by a particular stream to being handled in something application specific (i.e. HTTP vs the QUIC transport, e.g. QuicSpdyStream and QuicSpdySession).

Garrett Wahlstedt

unread,
Nov 15, 2022, 2:15:56 PM11/15/22
to QUIC Prototype Protocol Discussion group, nha...@chromium.org, QUIC Prototype Protocol Discussion group, Garrett Wahlstedt
Thanks for the insight, I've been using the Call Hierarchy in code search to try and work out what the flow of the program looks like. The problem I am running into now is that the data I see when printing the StreamFrame appears to be encoded in some fashion. 

This is the output I get CMD Output.jpg from adding print statements Screenshot_1.jpg to the OnStreamFrame function. The page I am requesting with the client is "https://www.example.org/home.html" and it appears that the first '☻?ß ♥└î±π┬σ≥:ká½₧╔┐┴' part of the output is the 'https://www.example.org' and the end part 'êbs╥UτM4⌂' is the 'home.html' since if I request a different page such as "https://www.example.org/home.html" I get an output of Screenshot_2.jpg.

My overall goal is to extract the data in the PATH request header after it is decoded.

Thanks for your help!
Reply all
Reply to author
Forward
0 new messages