gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 35/39: http3: Add content-type in POST request.


From: gnunet
Subject: [gnunet] 35/39: http3: Add content-type in POST request.
Date: Sun, 25 Aug 2024 15:16:31 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 1d58dda0ac53e976b38dd216b5f1ad9af2528991
Author: Shichao <mrrr61@outlook.com>
AuthorDate: Fri Aug 23 14:43:25 2024 +0800

    http3: Add content-type in POST request.
---
 src/service/transport/gnunet-communicator-http3.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/service/transport/gnunet-communicator-http3.c 
b/src/service/transport/gnunet-communicator-http3.c
index f052ab341..f0fb59daa 100644
--- a/src/service/transport/gnunet-communicator-http3.c
+++ b/src/service/transport/gnunet-communicator-http3.c
@@ -950,7 +950,7 @@ submit_post_request (struct Connection *connection,
                      const uint8_t *data,
                      size_t datalen)
 {
-  nghttp3_nv nva[6];
+  nghttp3_nv nva[7];
   char contentlen[20];
   nghttp3_data_reader dr = {};
   int rv;
@@ -976,13 +976,16 @@ submit_post_request (struct Connection *connection,
   nva[4] = make_nv ("user-agent", "nghttp3/ngtcp2 client",
                     NGHTTP3_NV_FLAG_NO_COPY_NAME
                     | NGHTTP3_NV_FLAG_NO_COPY_VALUE);
-  nva[5] = make_nv ("content-length", contentlen,
+  nva[5] = make_nv ("content-type", "application/octet-stream",
+                    NGHTTP3_NV_FLAG_NO_COPY_NAME
+                    | NGHTTP3_NV_FLAG_NO_COPY_VALUE);
+  nva[6] = make_nv ("content-length", contentlen,
                     NGHTTP3_NV_FLAG_NO_COPY_NAME);
 
   dr.read_data = read_data;
   rv = nghttp3_conn_submit_request (connection->h3_conn,
                                     stream->stream_id,
-                                    nva, 6, &dr, stream);
+                                    nva, 7, &dr, stream);
   if (0 != rv)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]