How to send HTTP3 request between server and client #4931
-
I have written HTTP3 listener using a sample provided in the MSQUIC library, and my server listens in the 5000 port. I want to receive HTTPS requests in GET, POST, and OPTIONS methods and send responses for those. I have triggered a request from CURL. Since curl rejects self-signed certificates I have requested an insecure connection using the below command,
For a single request from a client I have received 3 QUIC_STREAM_EVENT_RECEIVE triggers and the data received in the stream is not in readable format. I have mentioned my code in ServerStreamCallback()
OUTPUT in HTTP3 listener: OUTPUT in CURL client: NOTE:If I send a data from client written using MSQUIC the above server code works well. MSQUIC CLIENT CODE:
OUTPUT OF HTTP3 LISTENER: OUTPUT OF MSQUIC CLIENT: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Feel free to take a look at how I do this in msh3: https://github.com/nibanks/msh3/blob/main/lib/msh3.cpp |
Beta Was this translation helpful? Give feedback.
HTTP/3 (and HTTP/2) uses a binary format for the headers and messages in HTTP, while HTTP/1.1 used human-readable text.
So yes, you'll need to decode the received frames using some QPACK library, such as ls-qpack.