gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (be106588 -> f5fc702a)


From: gnunet
Subject: [libmicrohttpd] branch master updated (be106588 -> f5fc702a)
Date: Thu, 19 Aug 2021 15:07:24 +0200

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from be106588 keepalive_possible: simplified; added new value for 
MHD_ConnKeepAlive
     new 5c7a9ff9 setup_reply_properties(): removed one assert
     new f5fc702a RFC compliance: HTTP/1.1 replies for HTTP/1.0 clients

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/include/microhttpd.h    |  2 +-
 src/microhttpd/connection.c | 22 +++++++++++++---------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index d2b63947..e1bf8dd1 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -131,7 +131,7 @@ typedef intptr_t ssize_t;
  * they are parsed as decimal numbers.
  * Example: 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00097306
+#define MHD_VERSION 0x00097307
 
 
 #ifdef __has_attribute
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 96d1a39e..0f05f849 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1647,7 +1647,6 @@ setup_reply_properties (struct MHD_Connection *connection)
 
     if ( (MHD_SIZE_UNKNOWN == r->total_size) && ! use_chunked)
     {
-      mhd_assert (! MHD_IS_HTTP_VER_1_1_COMPAT (c->http_ver));
       /* End of the stream is indicated by closure */
       c->keepalive = MHD_CONN_MUST_CLOSE;
     }
@@ -1869,20 +1868,25 @@ build_header_response (struct MHD_Connection 
*connection)
 
   /* The HTTP version */
   if (0 == (c->responseCode & MHD_ICY_FLAG))
-  {
-    if ((0 != (r->flags & MHD_RF_HTTP_VERSION_1_0_RESPONSE)) ||
-        (MHD_HTTP_VER_1_0 == c->http_ver) )
-    {
-      /* TODO: use HTTP/1.1 responses for HTTP/1.0 clients.
+  { /* HTTP reply */
+    if (0 != (r->flags & MHD_RF_HTTP_VERSION_1_0_RESPONSE))
+    { /* HTTP/1.1 reply */
+      /* Use HTTP/1.1 responses for HTTP/1.0 clients.
        * See https://datatracker.ietf.org/doc/html/rfc7230#section-2.6 */
       if (! buffer_append_s (buf, &pos, buf_size, MHD_HTTP_VERSION_1_0))
         return MHD_NO;
     }
-    else if (! buffer_append_s (buf, &pos, buf_size, MHD_HTTP_VERSION_1_1))
+    else
+    { /* HTTP/1.0 reply */
+      if (! buffer_append_s (buf, &pos, buf_size, MHD_HTTP_VERSION_1_1))
+        return MHD_NO;
+    }
+  }
+  else
+  { /* ICY reply */
+    if (! buffer_append_s (buf, &pos, buf_size, "ICY"))
       return MHD_NO;
   }
-  else if (! buffer_append_s (buf, &pos, buf_size, "ICY"))
-    return MHD_NO;
 
   /* The response code */
   if (buf_size < pos + 5) /* space + code + space */

-- 
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]