gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (22300a52 -> 645b0140)


From: gnunet
Subject: [libmicrohttpd] branch master updated (22300a52 -> 645b0140)
Date: Sat, 30 Oct 2021 19:17:17 +0200

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from 22300a52 microhttpd.h: doxy clarifications
     new 8c644fc1 Updated HTTP statuses
     new aed886a2 Updated HTTP methods
     new 50b44dcf Updated HTTP headers names
     new 104fc263 microhttpd.h: fixed typo in doxy
     new 198551d2 microhttpd.h: MHD_ResponseFlags comments
     new 38a571a9 Improved doxy for MHD_add_response_header()
     new a89cb31f src/microhttpd/Makefile.am: removed empty lines
     new 4fe217e3 keepalive_possible(): added TODOs
     new 6468c233 get_date_str(): additional check
     new db643107 connection_maximize_write_buffer(): fixed comment
     new 4b408a76 setup_reply_properties(): improved comments
     new 057ecebe connection.c: improved comments
     new 645b0140 build_header_response(): added assert

The 13 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:
 contrib/gen_http_headers_insert.sh   | 129 ++++-
 contrib/gen_http_methods_insert.sh   |  16 +-
 contrib/gen_http_statuses_inserts.sh |  26 +-
 src/include/microhttpd.h             | 988 ++++++++++++++++++++---------------
 src/microhttpd/Makefile.am           |   2 -
 src/microhttpd/connection.c          |  24 +-
 src/microhttpd/daemon.c              |   8 +-
 src/microhttpd/reason_phrase.c       |  90 ++--
 src/microhttpd/response.c            |  10 +-
 9 files changed, 748 insertions(+), 545 deletions(-)

diff --git a/contrib/gen_http_headers_insert.sh 
b/contrib/gen_http_headers_insert.sh
index 6fce2809..d373045e 100755
--- a/contrib/gen_http_headers_insert.sh
+++ b/contrib/gen_http_headers_insert.sh
@@ -4,59 +4,130 @@
 #   Generate header insert for HTTP headers
 #
 
-#   Copyright (c) 2015-2019 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
+#   Copyright (c) 2015-2021 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-wget -nv http://www.iana.org/assignments/message-headers/perm-headers.csv -O 
perm-headers.csv || exit
+wget -nv https://www.iana.org/assignments/http-fields/field-names.csv -O 
perm-headers.csv || exit
 echo Generating...
 echo '/**
  * @defgroup headers HTTP headers
  * These are the standard headers found in HTTP requests and responses.
- * See: http://www.iana.org/assignments/message-headers/message-headers.xml
- * Registry export date: '$(date -u +%Y-%m-%d)'
+ * See: https://www.iana.org/assignments/http-fields/http-fields.xhtml
+ * Registry export date: '"$(date -u +%Y-%m-%d)"'
  * @{
  */
 
 /* Main HTTP headers. */' > header_insert_headers.h && \
 gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
-{
-  if ($3 == "http") {
-    gsub(/^\[|^"\[|\]"$|\]$/, "", $5)
-    rfc_num = substr($5, 4, 4)
-    if (rfc_num >= 7230 && rfc_num <= 7235)
+FNR > 1 {
+    gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+    field_name = $1
+    status = $3
+    ref = $4
+    comment = $5
+    if ("RFC-ietf-httpbis" == substr(ref, 1, 16))
     {
-      gsub(/\]\[/, "; ", $5)
-      if (length($4) == 0) 
-      { $4 = "No category" }
+      gsub(/\]\[/, "; ", ref)
+      if (length(status) == 0)
+      { status = "No category" }
       else
-      { sub(/^./, toupper(substr($4, 1, 1)), $4) }
-      print "/* " sprintf("%-14.14s", $4 ".") " " $5 " */"
-      print "#define MHD_HTTP_HEADER_" toupper(gensub(/-/, "_", "g", $1)) " 
\""$1"\""
+      { sub(/^./, toupper(substr(status, 1, 1)), status) }
+      field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+      field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+      printf ("/* %-14.14s %s */\n", status ".", ref)
+      printf ("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), 
$1)
     }
-  }
 }' perm-headers.csv >> header_insert_headers.h && \
 echo '
 /* Additional HTTP headers. */' >> header_insert_headers.h && \
 gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
-{
-  if ($3 == "http") {
-    gsub(/^\[|^"\[|\]"$|\]$/, "", $5)
-    rfc_num = substr($5, 4, 4)
-    if (!(rfc_num >= 7230 && rfc_num <= 7235))
+FNR > 1 {
+    gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+    field_name = $1
+    status = $3
+    ref = $4
+    comment = $5
+    if ("RFC-ietf-httpbis" != substr(ref, 1, 16) && status == "permanent")
     {
-      gsub(/\]\[/, "; ", $5)
-      if (length($4) == 0) 
-      { $4 = "No category" }
-      else
-      { sub(/^./, toupper(substr($4, 1, 1)), $4) }
-      print "/* " sprintf("%-14.14s", $4 ".") " " $5 " */"
-      print "#define MHD_HTTP_HEADER_" toupper(gensub(/-/, "_", "g", $1)) " 
\""$1"\""
+      gsub(/\]\[/, "; ", ref)
+      sub(/^./, toupper(substr(status, 1, 1)), status)
+      field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+      field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+      printf ("/* %-14.14s %s */\n", status ".", ref)
+      printf ("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), 
$1)
+    }
+}' perm-headers.csv >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+    gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+    field_name = $1
+    status = $3
+    ref = $4
+    comment = $5
+    if ("RFC-ietf-httpbis" != substr(ref, 1, 16) && status == "provisional")
+    {
+      gsub(/\]\[/, "; ", ref)
+      sub(/^./, toupper(substr(status, 1, 1)), status)
+      field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+      field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+      printf ("/* %-14.14s %s */\n", status ".", ref)
+      printf ("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), 
$1)
+    }
+}' perm-headers.csv >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+    gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+    field_name = $1
+    status = $3
+    ref = $4
+    comment = $5
+    if ("RFC-ietf-httpbis" != substr(ref, 1, 16) && length(status) == 0)
+    {
+      gsub(/\]\[/, "; ", ref)
+      status = "No category"
+      field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+      field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+      printf ("/* %-14.14s %s */\n", status ".", ref)
+      printf ("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), 
$1)
+    }
+}' perm-headers.csv >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+    gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+    field_name = $1
+    status = $3
+    ref = $4
+    comment = $5
+    if ("RFC-ietf-httpbis" != substr(ref, 1, 16) && status == "deprecated")
+    {
+      gsub(/\]\[/, "; ", ref)
+      sub(/^./, toupper(substr(status, 1, 1)), status)
+      field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+      field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+      printf ("/* %-14.14s %s */\n", status ".", ref)
+      printf ("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), 
$1)
+    }
+}' perm-headers.csv >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+    gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+    field_name = $1
+    status = $3
+    ref = $4
+    comment = $5
+    if ("RFC-ietf-httpbis" != substr(ref, 1, 16) && status == "obsoleted")
+    {
+      gsub(/\]\[/, "; ", ref)
+      sub(/^./, toupper(substr(status, 1, 1)), status)
+      field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+      field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+      printf ("/* %-14.14s %s */\n", status ".", ref)
+      printf ("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), 
$1)
     }
-  }
 }' perm-headers.csv >> header_insert_headers.h && \
 echo OK && \
 rm perm-headers.csv || exit
diff --git a/contrib/gen_http_methods_insert.sh 
b/contrib/gen_http_methods_insert.sh
index 38485848..65076081 100755
--- a/contrib/gen_http_methods_insert.sh
+++ b/contrib/gen_http_methods_insert.sh
@@ -4,7 +4,7 @@
 #   Generate header insert for HTTP methods
 #
 
-#   Copyright (c) 2015-2019 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
+#   Copyright (c) 2015-2021 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
@@ -17,7 +17,7 @@ echo '/**
  * @defgroup methods HTTP methods
  * HTTP methods (as strings).
  * See: http://www.iana.org/assignments/http-methods/http-methods.xml
- * Registry export date: '$(date -u +%Y-%m-%d)'
+ * Registry export date: '"$(date -u +%Y-%m-%d)"'
  * @{
  */
 
@@ -26,7 +26,7 @@ gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
 FNR > 1 {
   gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
   gsub(/\]\[/, "; ", $4)
-  if (substr($4, 1, 7) == "RFC7231") {
+  if (substr($4, 1, 26) == "RFC-ietf-httpbis-semantics") {
     if ($2 == "yes")
     { safe_m = "Safe.    " }
     else
@@ -36,7 +36,9 @@ FNR > 1 {
     else
     { indem_m = "Not idempotent." }
     print "/* " safe_m " " indem_m " " $4 ". */"
-    print "#define MHD_HTTP_METHOD_" toupper(gensub(/-/, "_", "g", $1)) " 
\""$1"\""
+    mthd = gensub(/\*/, "ASTERISK", "g", $1)
+    mthd = gensub(/[^a-zA-Z0-9_]/, "_", "g", mthd)
+    printf ("%-32s \"%s\"\n", "#define MHD_HTTP_METHOD_" toupper(mthd), $1)
   }
 }' methods.csv >> header_insert_methods.h && \
 echo '
@@ -45,7 +47,7 @@ gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
 FNR > 1 {
   gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
   gsub(/\]\[/, "; ", $4)
-  if (substr($4, 1, 7) != "RFC7231") {
+  if (substr($4, 1, 26) != "RFC-ietf-httpbis-semantics") {
     if ($2 == "yes")
     { safe_m = "Safe.    " }
     else
@@ -55,7 +57,9 @@ FNR > 1 {
     else
     { indem_m = "Not idempotent." }
     print "/* " safe_m " " indem_m " " $4 ". */"
-    print "#define MHD_HTTP_METHOD_" toupper(gensub(/-/, "_", "g", $1)) " 
\""$1"\""
+    mthd = gensub(/\*/, "ASTERISK", "g", $1)
+    mthd = gensub(/[^a-zA-Z0-9_]/, "_", "g", mthd)
+    printf ("%-38s \"%s\"\n", "#define MHD_HTTP_METHOD_" toupper(mthd), $1)
   }
 }' methods.csv >> header_insert_methods.h && \
 echo OK && \
diff --git a/contrib/gen_http_statuses_inserts.sh 
b/contrib/gen_http_statuses_inserts.sh
index 3a7dedb1..a4f2bb01 100755
--- a/contrib/gen_http_statuses_inserts.sh
+++ b/contrib/gen_http_statuses_inserts.sh
@@ -4,7 +4,7 @@
 #   Generate code and header inserts for HTTP statues
 #
 
-#   Copyright (c) 2019 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
+#   Copyright (c) 2019-2021 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
@@ -13,25 +13,25 @@
 
 wget -nv 
https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv -O 
http-status-codes-1.csv || exit
 echo Generating...
-echo "/**
+echo '/**
  * @defgroup httpcode HTTP response codes.
  * These are the status codes defined for HTTP responses.
  * See: 
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
- * Registry export date: $(date -u +%Y-%m-%d)
+ * Registry export date: '"$(date -u +%Y-%m-%d)"'
  * @{
  */
-" > header_insert_statuses.h && \
+' > header_insert_statuses.h && \
 gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
 FNR > 1 {
   gsub(/^\[|^"\[|\]"$|\]$/, "", $3)
   gsub(/\]\[/, "; ", $3)
-  if ($1 == 306) { 
-    $2 = "Switch Proxy" 
+  if ($1 == 306) {
+    $2 = "Switch Proxy"
     $3 = "Not used! " $3
   }
-  if ($2 != "Unassigned") {
-    print "/* " $1 sprintf("%-24s", " \"" $2 "\". ") $3 ". */"
-    print "#define MHD_HTTP_" toupper(gensub(/[^A-Za-z0-0]/, "_", "g", $2)) " 
"$1""
+  if ($2 != "Unassigned" && $2 != "(Unused)") {
+    printf ("/* %s %-22s %s. */\n", $1, "\"" $2 "\".", $3)
+    printf ("#define MHD_HTTP_%-27s %s\n", toupper(gensub(/[^A-Za-z0-0]/, "_", 
"g", $2)), $1)
   } else {
     print ""
   }
@@ -39,13 +39,13 @@ FNR > 1 {
 echo '
 /* Not registered non-standard codes */
 /* 449 "Reply With".          MS IIS extension. */
-#define MHD_HTTP_RETRY_WITH 449
+#define MHD_HTTP_RETRY_WITH                  449
 
 /* 450 "Blocked by Windows Parental Controls". MS extension. */
 #define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
 
 /* 509 "Bandwidth Limit Exceeded". Apache extension. */
-#define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
+#define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED    509
 ' >> header_insert_statuses.h && \
 gawk -e 'BEGIN {
   FPAT = "([^,]*)|(\"[^\"]+\")"
@@ -76,10 +76,10 @@ FNR > 1 {
     print "static const struct _MHD_str_w_len " hundreds[$1/100] "_hundred[] = 
{"
   }
   if (num == 306) { 
-    reason = "Switch Proxy" 
+    reason = "Switch Proxy"
     desc = "Not used! " desc
   }
-  if (reason == "Unassigned") next
+  if (reason == "Unassigned" || reason == "(Unused)") next
   if (prev_num != num)
     printf ("  /* %s */ %-36s /* %s */\n", prev_num, "_MHD_S_STR_W_LEN 
(\""prev_reason"\"),", prev_desc)
   while(++prev_num < num) {
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index af19c0fa..a100d950 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -339,114 +339,115 @@ _MHD_DEPR_MACRO ( \
  * @defgroup httpcode HTTP response codes.
  * These are the status codes defined for HTTP responses.
  * See: 
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
- * Registry export date: 2021-06-08
+ * Registry export date: 2021-10-30
  * @{
  */
 
-/* 100 "Continue".            RFC7231, Section 6.2.1. */
-#define MHD_HTTP_CONTINUE 100
-/* 101 "Switching Protocols". RFC7231, Section 6.2.2. */
-#define MHD_HTTP_SWITCHING_PROTOCOLS 101
+/* 100 "Continue".            RFC-ietf-httpbis-semantics, Section 15.2.1. */
+#define MHD_HTTP_CONTINUE                    100
+/* 101 "Switching Protocols". RFC-ietf-httpbis-semantics, Section 15.2.2. */
+#define MHD_HTTP_SWITCHING_PROTOCOLS         101
 /* 102 "Processing".          RFC2518. */
-#define MHD_HTTP_PROCESSING 102
+#define MHD_HTTP_PROCESSING                  102
 /* 103 "Early Hints".         RFC8297. */
-#define MHD_HTTP_EARLY_HINTS 103
-
-/* 200 "OK".                  RFC7231, Section 6.3.1. */
-#define MHD_HTTP_OK 200
-/* 201 "Created".             RFC7231, Section 6.3.2. */
-#define MHD_HTTP_CREATED 201
-/* 202 "Accepted".            RFC7231, Section 6.3.3. */
-#define MHD_HTTP_ACCEPTED 202
-/* 203 "Non-Authoritative Information". RFC7231, Section 6.3.4. */
+#define MHD_HTTP_EARLY_HINTS                 103
+
+/* 200 "OK".                  RFC-ietf-httpbis-semantics, Section 15.3.1. */
+#define MHD_HTTP_OK                          200
+/* 201 "Created".             RFC-ietf-httpbis-semantics, Section 15.3.2. */
+#define MHD_HTTP_CREATED                     201
+/* 202 "Accepted".            RFC-ietf-httpbis-semantics, Section 15.3.3. */
+#define MHD_HTTP_ACCEPTED                    202
+/* 203 "Non-Authoritative Information". RFC-ietf-httpbis-semantics, Section 
15.3.4. */
 #define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203
-/* 204 "No Content".          RFC7231, Section 6.3.5. */
-#define MHD_HTTP_NO_CONTENT 204
-/* 205 "Reset Content".       RFC7231, Section 6.3.6. */
-#define MHD_HTTP_RESET_CONTENT 205
-/* 206 "Partial Content".     RFC7233, Section 4.1. */
-#define MHD_HTTP_PARTIAL_CONTENT 206
+/* 204 "No Content".          RFC-ietf-httpbis-semantics, Section 15.3.5. */
+#define MHD_HTTP_NO_CONTENT                  204
+/* 205 "Reset Content".       RFC-ietf-httpbis-semantics, Section 15.3.6. */
+#define MHD_HTTP_RESET_CONTENT               205
+/* 206 "Partial Content".     RFC-ietf-httpbis-semantics, Section 15.3.7. */
+#define MHD_HTTP_PARTIAL_CONTENT             206
 /* 207 "Multi-Status".        RFC4918. */
-#define MHD_HTTP_MULTI_STATUS 207
+#define MHD_HTTP_MULTI_STATUS                207
 /* 208 "Already Reported".    RFC5842. */
-#define MHD_HTTP_ALREADY_REPORTED 208
+#define MHD_HTTP_ALREADY_REPORTED            208
 
 /* 226 "IM Used".             RFC3229. */
-#define MHD_HTTP_IM_USED 226
-
-/* 300 "Multiple Choices".    RFC7231, Section 6.4.1. */
-#define MHD_HTTP_MULTIPLE_CHOICES 300
-/* 301 "Moved Permanently".   RFC7231, Section 6.4.2. */
-#define MHD_HTTP_MOVED_PERMANENTLY 301
-/* 302 "Found".               RFC7231, Section 6.4.3. */
-#define MHD_HTTP_FOUND 302
-/* 303 "See Other".           RFC7231, Section 6.4.4. */
-#define MHD_HTTP_SEE_OTHER 303
-/* 304 "Not Modified".        RFC7232, Section 4.1. */
-#define MHD_HTTP_NOT_MODIFIED 304
-/* 305 "Use Proxy".           RFC7231, Section 6.4.5. */
-#define MHD_HTTP_USE_PROXY 305
-/* 306 "Switch Proxy".        Not used! RFC7231, Section 6.4.6. */
-#define MHD_HTTP_SWITCH_PROXY 306
-/* 307 "Temporary Redirect".  RFC7231, Section 6.4.7. */
-#define MHD_HTTP_TEMPORARY_REDIRECT 307
-/* 308 "Permanent Redirect".  RFC7538. */
-#define MHD_HTTP_PERMANENT_REDIRECT 308
-
-/* 400 "Bad Request".         RFC7231, Section 6.5.1. */
-#define MHD_HTTP_BAD_REQUEST 400
-/* 401 "Unauthorized".        RFC7235, Section 3.1. */
-#define MHD_HTTP_UNAUTHORIZED 401
-/* 402 "Payment Required".    RFC7231, Section 6.5.2. */
-#define MHD_HTTP_PAYMENT_REQUIRED 402
-/* 403 "Forbidden".           RFC7231, Section 6.5.3. */
-#define MHD_HTTP_FORBIDDEN 403
-/* 404 "Not Found".           RFC7231, Section 6.5.4. */
-#define MHD_HTTP_NOT_FOUND 404
-/* 405 "Method Not Allowed".  RFC7231, Section 6.5.5. */
-#define MHD_HTTP_METHOD_NOT_ALLOWED 405
-/* 406 "Not Acceptable".      RFC7231, Section 6.5.6. */
-#define MHD_HTTP_NOT_ACCEPTABLE 406
-/* 407 "Proxy Authentication Required". RFC7235, Section 3.2. */
+#define MHD_HTTP_IM_USED                     226
+
+/* 300 "Multiple Choices".    RFC-ietf-httpbis-semantics, Section 15.4.1. */
+#define MHD_HTTP_MULTIPLE_CHOICES            300
+/* 301 "Moved Permanently".   RFC-ietf-httpbis-semantics, Section 15.4.2. */
+#define MHD_HTTP_MOVED_PERMANENTLY           301
+/* 302 "Found".               RFC-ietf-httpbis-semantics, Section 15.4.3. */
+#define MHD_HTTP_FOUND                       302
+/* 303 "See Other".           RFC-ietf-httpbis-semantics, Section 15.4.4. */
+#define MHD_HTTP_SEE_OTHER                   303
+/* 304 "Not Modified".        RFC-ietf-httpbis-semantics, Section 15.4.5. */
+#define MHD_HTTP_NOT_MODIFIED                304
+/* 305 "Use Proxy".           RFC-ietf-httpbis-semantics, Section 15.4.6. */
+#define MHD_HTTP_USE_PROXY                   305
+/* 306 "Switch Proxy".        Not used! RFC-ietf-httpbis-semantics, Section 
15.4.7. */
+#define MHD_HTTP_SWITCH_PROXY                306
+/* 307 "Temporary Redirect".  RFC-ietf-httpbis-semantics, Section 15.4.8. */
+#define MHD_HTTP_TEMPORARY_REDIRECT          307
+/* 308 "Permanent Redirect".  RFC-ietf-httpbis-semantics, Section 15.4.9. */
+#define MHD_HTTP_PERMANENT_REDIRECT          308
+
+/* 400 "Bad Request".         RFC-ietf-httpbis-semantics, Section 15.5.1. */
+#define MHD_HTTP_BAD_REQUEST                 400
+/* 401 "Unauthorized".        RFC-ietf-httpbis-semantics, Section 15.5.2. */
+#define MHD_HTTP_UNAUTHORIZED                401
+/* 402 "Payment Required".    RFC-ietf-httpbis-semantics, Section 15.5.3. */
+#define MHD_HTTP_PAYMENT_REQUIRED            402
+/* 403 "Forbidden".           RFC-ietf-httpbis-semantics, Section 15.5.4. */
+#define MHD_HTTP_FORBIDDEN                   403
+/* 404 "Not Found".           RFC-ietf-httpbis-semantics, Section 15.5.5. */
+#define MHD_HTTP_NOT_FOUND                   404
+/* 405 "Method Not Allowed".  RFC-ietf-httpbis-semantics, Section 15.5.6. */
+#define MHD_HTTP_METHOD_NOT_ALLOWED          405
+/* 406 "Not Acceptable".      RFC-ietf-httpbis-semantics, Section 15.5.7. */
+#define MHD_HTTP_NOT_ACCEPTABLE              406
+/* 407 "Proxy Authentication Required". RFC-ietf-httpbis-semantics, Section 
15.5.8. */
 #define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
-/* 408 "Request Timeout".     RFC7231, Section 6.5.7. */
-#define MHD_HTTP_REQUEST_TIMEOUT 408
-/* 409 "Conflict".            RFC7231, Section 6.5.8. */
-#define MHD_HTTP_CONFLICT 409
-/* 410 "Gone".                RFC7231, Section 6.5.9. */
-#define MHD_HTTP_GONE 410
-/* 411 "Length Required".     RFC7231, Section 6.5.10. */
-#define MHD_HTTP_LENGTH_REQUIRED 411
-/* 412 "Precondition Failed". RFC7232, Section 4.2; RFC8144, Section 3.2. */
-#define MHD_HTTP_PRECONDITION_FAILED 412
-/* 413 "Payload Too Large".   RFC7231, Section 6.5.11. */
-#define MHD_HTTP_PAYLOAD_TOO_LARGE 413
-/* 414 "URI Too Long".        RFC7231, Section 6.5.12. */
-#define MHD_HTTP_URI_TOO_LONG 414
-/* 415 "Unsupported Media Type". RFC7231, Section 6.5.13; RFC7694, Section 3. 
*/
-#define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415
-/* 416 "Range Not Satisfiable". RFC7233, Section 4.4. */
-#define MHD_HTTP_RANGE_NOT_SATISFIABLE 416
-/* 417 "Expectation Failed".  RFC7231, Section 6.5.14. */
-#define MHD_HTTP_EXPECTATION_FAILED 417
-
-/* 421 "Misdirected Request". RFC7540, Section 9.1.2. */
-#define MHD_HTTP_MISDIRECTED_REQUEST 421
-/* 422 "Unprocessable Entity". RFC4918. */
-#define MHD_HTTP_UNPROCESSABLE_ENTITY 422
+/* 408 "Request Timeout".     RFC-ietf-httpbis-semantics, Section 15.5.9. */
+#define MHD_HTTP_REQUEST_TIMEOUT             408
+/* 409 "Conflict".            RFC-ietf-httpbis-semantics, Section 15.5.10. */
+#define MHD_HTTP_CONFLICT                    409
+/* 410 "Gone".                RFC-ietf-httpbis-semantics, Section 15.5.11. */
+#define MHD_HTTP_GONE                        410
+/* 411 "Length Required".     RFC-ietf-httpbis-semantics, Section 15.5.12. */
+#define MHD_HTTP_LENGTH_REQUIRED             411
+/* 412 "Precondition Failed". RFC-ietf-httpbis-semantics, Section 15.5.13. */
+#define MHD_HTTP_PRECONDITION_FAILED         412
+/* 413 "Content Too Large".   RFC-ietf-httpbis-semantics, Section 15.5.14. */
+#define MHD_HTTP_CONTENT_TOO_LARGE           413
+/* 414 "URI Too Long".        RFC-ietf-httpbis-semantics, Section 15.5.15. */
+#define MHD_HTTP_URI_TOO_LONG                414
+/* 415 "Unsupported Media Type". RFC-ietf-httpbis-semantics, Section 15.5.16. 
*/
+#define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE      415
+/* 416 "Range Not Satisfiable". RFC-ietf-httpbis-semantics, Section 15.5.17. */
+#define MHD_HTTP_RANGE_NOT_SATISFIABLE       416
+/* 417 "Expectation Failed".  RFC-ietf-httpbis-semantics, Section 15.5.18. */
+#define MHD_HTTP_EXPECTATION_FAILED          417
+
+
+/* 421 "Misdirected Request". RFC-ietf-httpbis-semantics, Section 15.5.20. */
+#define MHD_HTTP_MISDIRECTED_REQUEST         421
+/* 422 "Unprocessable Content". RFC-ietf-httpbis-semantics, Section 15.5.21. */
+#define MHD_HTTP_UNPROCESSABLE_CONTENT       422
 /* 423 "Locked".              RFC4918. */
-#define MHD_HTTP_LOCKED 423
+#define MHD_HTTP_LOCKED                      423
 /* 424 "Failed Dependency".   RFC4918. */
-#define MHD_HTTP_FAILED_DEPENDENCY 424
+#define MHD_HTTP_FAILED_DEPENDENCY           424
 /* 425 "Too Early".           RFC8470. */
-#define MHD_HTTP_TOO_EARLY 425
-/* 426 "Upgrade Required".    RFC7231, Section 6.5.15. */
-#define MHD_HTTP_UPGRADE_REQUIRED 426
+#define MHD_HTTP_TOO_EARLY                   425
+/* 426 "Upgrade Required".    RFC-ietf-httpbis-semantics, Section 15.5.22. */
+#define MHD_HTTP_UPGRADE_REQUIRED            426
 
 /* 428 "Precondition Required". RFC6585. */
-#define MHD_HTTP_PRECONDITION_REQUIRED 428
+#define MHD_HTTP_PRECONDITION_REQUIRED       428
 /* 429 "Too Many Requests".   RFC6585. */
-#define MHD_HTTP_TOO_MANY_REQUESTS 429
+#define MHD_HTTP_TOO_MANY_REQUESTS           429
 
 /* 431 "Request Header Fields Too Large". RFC6585. */
 #define MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
@@ -454,43 +455,43 @@ _MHD_DEPR_MACRO ( \
 /* 451 "Unavailable For Legal Reasons". RFC7725. */
 #define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
 
-/* 500 "Internal Server Error". RFC7231, Section 6.6.1. */
-#define MHD_HTTP_INTERNAL_SERVER_ERROR 500
-/* 501 "Not Implemented".     RFC7231, Section 6.6.2. */
-#define MHD_HTTP_NOT_IMPLEMENTED 501
-/* 502 "Bad Gateway".         RFC7231, Section 6.6.3. */
-#define MHD_HTTP_BAD_GATEWAY 502
-/* 503 "Service Unavailable". RFC7231, Section 6.6.4. */
-#define MHD_HTTP_SERVICE_UNAVAILABLE 503
-/* 504 "Gateway Timeout".     RFC7231, Section 6.6.5. */
-#define MHD_HTTP_GATEWAY_TIMEOUT 504
-/* 505 "HTTP Version Not Supported". RFC7231, Section 6.6.6. */
-#define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
+/* 500 "Internal Server Error". RFC-ietf-httpbis-semantics, Section 15.6.1. */
+#define MHD_HTTP_INTERNAL_SERVER_ERROR       500
+/* 501 "Not Implemented".     RFC-ietf-httpbis-semantics, Section 15.6.2. */
+#define MHD_HTTP_NOT_IMPLEMENTED             501
+/* 502 "Bad Gateway".         RFC-ietf-httpbis-semantics, Section 15.6.3. */
+#define MHD_HTTP_BAD_GATEWAY                 502
+/* 503 "Service Unavailable". RFC-ietf-httpbis-semantics, Section 15.6.4. */
+#define MHD_HTTP_SERVICE_UNAVAILABLE         503
+/* 504 "Gateway Timeout".     RFC-ietf-httpbis-semantics, Section 15.6.5. */
+#define MHD_HTTP_GATEWAY_TIMEOUT             504
+/* 505 "HTTP Version Not Supported". RFC-ietf-httpbis-semantics, Section 
15.6.6. */
+#define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED  505
 /* 506 "Variant Also Negotiates". RFC2295. */
-#define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506
+#define MHD_HTTP_VARIANT_ALSO_NEGOTIATES     506
 /* 507 "Insufficient Storage". RFC4918. */
-#define MHD_HTTP_INSUFFICIENT_STORAGE 507
+#define MHD_HTTP_INSUFFICIENT_STORAGE        507
 /* 508 "Loop Detected".       RFC5842. */
-#define MHD_HTTP_LOOP_DETECTED 508
+#define MHD_HTTP_LOOP_DETECTED               508
 
 /* 510 "Not Extended".        RFC2774. */
-#define MHD_HTTP_NOT_EXTENDED 510
+#define MHD_HTTP_NOT_EXTENDED                510
 /* 511 "Network Authentication Required". RFC6585. */
 #define MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
 
 
 /* Not registered non-standard codes */
 /* 449 "Reply With".          MS IIS extension. */
-#define MHD_HTTP_RETRY_WITH 449
+#define MHD_HTTP_RETRY_WITH                  449
 
 /* 450 "Blocked by Windows Parental Controls". MS extension. */
 #define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
 
 /* 509 "Bandwidth Limit Exceeded". Apache extension. */
-#define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
+#define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED    509
 
 
-/* Deprecated codes */
+/* Deprecated names and codes */
 /** @deprecated */
 #define MHD_HTTP_METHOD_NOT_ACCEPTABLE \
   _MHD_DEPR_IN_MACRO ( \
@@ -500,7 +501,13 @@ _MHD_DEPR_MACRO ( \
 /** @deprecated */
 #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \
   _MHD_DEPR_IN_MACRO ( \
-    "Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use 
MHD_HTTP_PAYLOAD_TOO_LARGE") \
+    "Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use 
MHD_HTTP_CONTENT_TOO_LARGE") \
+  413
+
+/** @deprecated */
+#define MHD_HTTP_PAYLOAD_TOO_LARGE \
+    _MHD_DEPR_IN_MACRO ( \
+      "Value MHD_HTTP_PAYLOAD_TOO_LARGE is deprecated, use 
MHD_HTTP_CONTENT_TOO_LARGE") \
   413
 
 /** @deprecated */
@@ -515,6 +522,12 @@ _MHD_DEPR_MACRO ( \
     "Value MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE is deprecated, use 
MHD_HTTP_RANGE_NOT_SATISFIABLE") \
   416
 
+/** @deprecated */
+#define MHD_HTTP_UNPROCESSABLE_ENTITY \
+  _MHD_DEPR_IN_MACRO ( \
+    "Value MHD_HTTP_UNPROCESSABLE_ENTITY is deprecated, use 
MHD_HTTP_UNPROCESSABLE_CONTENT") \
+  422
+
 /** @deprecated */
 #define MHD_HTTP_UNORDERED_COLLECTION \
   _MHD_DEPR_IN_MACRO ( \
@@ -560,354 +573,457 @@ MHD_get_reason_phrase_len_for (unsigned int code);
 /**
  * @defgroup headers HTTP headers
  * These are the standard headers found in HTTP requests and responses.
- * See: http://www.iana.org/assignments/message-headers/message-headers.xml
- * Registry export date: 2020-09-20
+ * See: https://www.iana.org/assignments/http-fields/http-fields.xhtml
+ * Registry export date: 2021-10-30
  * @{
  */
 
 /* Main HTTP headers. */
-/* Standard.      RFC7231, Section 5.3.2 */
-#define MHD_HTTP_HEADER_ACCEPT "Accept"
-/* Standard.      RFC7231, Section 5.3.3 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 12.5.1 */
+#define MHD_HTTP_HEADER_ACCEPT       "Accept"
+/* Deprecated.    RFC-ietf-httpbis-semantics-19, Section 12.5.2 */
 #define MHD_HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"
-/* Standard.      RFC7231, Section 5.3.4; RFC7694, Section 3 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 12.5.3 */
 #define MHD_HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding"
-/* Standard.      RFC7231, Section 5.3.5 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 12.5.4 */
 #define MHD_HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"
-/* Standard.      RFC7233, Section 2.3 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 14.3 */
 #define MHD_HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges"
-/* Standard.      RFC7234, Section 5.1 */
-#define MHD_HTTP_HEADER_AGE "Age"
-/* Standard.      RFC7231, Section 7.4.1 */
-#define MHD_HTTP_HEADER_ALLOW "Allow"
-/* Standard.      RFC7235, Section 4.2 */
+/* Permanent.     RFC-ietf-httpbis-cache-19, Section 5.1 */
+#define MHD_HTTP_HEADER_AGE          "Age"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.2.1 */
+#define MHD_HTTP_HEADER_ALLOW        "Allow"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 11.6.3 */
+#define MHD_HTTP_HEADER_AUTHENTICATION_INFO "Authentication-Info"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 11.6.2 */
 #define MHD_HTTP_HEADER_AUTHORIZATION "Authorization"
-/* Standard.      RFC7234, Section 5.2 */
+/* Permanent.     RFC-ietf-httpbis-cache-19, Section 5.2 */
 #define MHD_HTTP_HEADER_CACHE_CONTROL "Cache-Control"
-/* Reserved.      RFC7230, Section 8.1 */
-#define MHD_HTTP_HEADER_CLOSE "Close"
-/* Standard.      RFC7230, Section 6.1 */
-#define MHD_HTTP_HEADER_CONNECTION "Connection"
-/* Standard.      RFC7231, Section 3.1.2.2 */
+/* Permanent.     RFC-ietf-httpbis-cache-header-10 */
+#define MHD_HTTP_HEADER_CACHE_STATUS "Cache-Status"
+/* Permanent.     RFC-ietf-httpbis-messaging-19, Section 9.6 */
+#define MHD_HTTP_HEADER_CLOSE        "Close"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 7.6.1 */
+#define MHD_HTTP_HEADER_CONNECTION   "Connection"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 8.4 */
 #define MHD_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"
-/* Standard.      RFC7231, Section 3.1.3.2 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 8.5 */
 #define MHD_HTTP_HEADER_CONTENT_LANGUAGE "Content-Language"
-/* Standard.      RFC7230, Section 3.3.2 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 8.6 */
 #define MHD_HTTP_HEADER_CONTENT_LENGTH "Content-Length"
-/* Standard.      RFC7231, Section 3.1.4.2 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 8.7 */
 #define MHD_HTTP_HEADER_CONTENT_LOCATION "Content-Location"
-/* Standard.      RFC7233, Section 4.2 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 14.4 */
 #define MHD_HTTP_HEADER_CONTENT_RANGE "Content-Range"
-/* Standard.      RFC7231, Section 3.1.1.5 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 8.3 */
 #define MHD_HTTP_HEADER_CONTENT_TYPE "Content-Type"
-/* Standard.      RFC7231, Section 7.1.1.2 */
-#define MHD_HTTP_HEADER_DATE "Date"
-/* Standard.      RFC7232, Section 2.3 */
-#define MHD_HTTP_HEADER_ETAG "ETag"
-/* Standard.      RFC7231, Section 5.1.1 */
-#define MHD_HTTP_HEADER_EXPECT "Expect"
-/* Standard.      RFC7234, Section 5.3 */
-#define MHD_HTTP_HEADER_EXPIRES "Expires"
-/* Standard.      RFC7231, Section 5.5.1 */
-#define MHD_HTTP_HEADER_FROM "From"
-/* Standard.      RFC7230, Section 5.4 */
-#define MHD_HTTP_HEADER_HOST "Host"
-/* Standard.      RFC7232, Section 3.1 */
-#define MHD_HTTP_HEADER_IF_MATCH "If-Match"
-/* Standard.      RFC7232, Section 3.3 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 6.6.1 */
+#define MHD_HTTP_HEADER_DATE         "Date"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 8.8.3 */
+#define MHD_HTTP_HEADER_ETAG         "ETag"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.1.1 */
+#define MHD_HTTP_HEADER_EXPECT       "Expect"
+/* Permanent.     RFC-ietf-httpbis-expect-ct-08 */
+#define MHD_HTTP_HEADER_EXPECT_CT    "Expect-CT"
+/* Permanent.     RFC-ietf-httpbis-cache-19, Section 5.3 */
+#define MHD_HTTP_HEADER_EXPIRES      "Expires"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.1.2 */
+#define MHD_HTTP_HEADER_FROM         "From"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 7.2 */
+#define MHD_HTTP_HEADER_HOST         "Host"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 13.1.1 */
+#define MHD_HTTP_HEADER_IF_MATCH     "If-Match"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 13.1.3 */
 #define MHD_HTTP_HEADER_IF_MODIFIED_SINCE "If-Modified-Since"
-/* Standard.      RFC7232, Section 3.2 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 13.1.2 */
 #define MHD_HTTP_HEADER_IF_NONE_MATCH "If-None-Match"
-/* Standard.      RFC7233, Section 3.2 */
-#define MHD_HTTP_HEADER_IF_RANGE "If-Range"
-/* Standard.      RFC7232, Section 3.4 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 13.1.5 */
+#define MHD_HTTP_HEADER_IF_RANGE     "If-Range"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 13.1.4 */
 #define MHD_HTTP_HEADER_IF_UNMODIFIED_SINCE "If-Unmodified-Since"
-/* Standard.      RFC7232, Section 2.2 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 8.8.2 */
 #define MHD_HTTP_HEADER_LAST_MODIFIED "Last-Modified"
-/* Standard.      RFC7231, Section 7.1.2 */
-#define MHD_HTTP_HEADER_LOCATION "Location"
-/* Standard.      RFC7231, Section 5.1.2 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.2.2 */
+#define MHD_HTTP_HEADER_LOCATION     "Location"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 7.6.2 */
 #define MHD_HTTP_HEADER_MAX_FORWARDS "Max-Forwards"
-/* Standard.      RFC7231, Appendix A.1 */
+/* Permanent.     RFC-ietf-httpbis-messaging-19, Appendix B.1 */
 #define MHD_HTTP_HEADER_MIME_VERSION "MIME-Version"
-/* Standard.      RFC7234, Section 5.4 */
-#define MHD_HTTP_HEADER_PRAGMA "Pragma"
-/* Standard.      RFC7235, Section 4.3 */
+/* Permanent.     RFC-ietf-httpbis-cache-19, Section 5.4 */
+#define MHD_HTTP_HEADER_PRAGMA       "Pragma"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 11.7.1 */
 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate"
-/* Standard.      RFC7235, Section 4.4 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 11.7.3 */
+#define MHD_HTTP_HEADER_PROXY_AUTHENTICATION_INFO "Proxy-Authentication-Info"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 11.7.2 */
 #define MHD_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization"
-/* Standard.      RFC7233, Section 3.1 */
-#define MHD_HTTP_HEADER_RANGE "Range"
-/* Standard.      RFC7231, Section 5.5.2 */
-#define MHD_HTTP_HEADER_REFERER "Referer"
-/* Standard.      RFC7231, Section 7.1.3 */
-#define MHD_HTTP_HEADER_RETRY_AFTER "Retry-After"
-/* Standard.      RFC7231, Section 7.4.2 */
-#define MHD_HTTP_HEADER_SERVER "Server"
-/* Standard.      RFC7230, Section 4.3 */
-#define MHD_HTTP_HEADER_TE "TE"
-/* Standard.      RFC7230, Section 4.4 */
-#define MHD_HTTP_HEADER_TRAILER "Trailer"
-/* Standard.      RFC7230, Section 3.3.1 */
+/* Permanent.     RFC-ietf-httpbis-proxy-status-08 */
+#define MHD_HTTP_HEADER_PROXY_STATUS "Proxy-Status"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 14.2 */
+#define MHD_HTTP_HEADER_RANGE        "Range"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.1.3 */
+#define MHD_HTTP_HEADER_REFERER      "Referer"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.2.3 */
+#define MHD_HTTP_HEADER_RETRY_AFTER  "Retry-After"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.2.4 */
+#define MHD_HTTP_HEADER_SERVER       "Server"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.1.4 */
+#define MHD_HTTP_HEADER_TE           "TE"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 6.6.2 */
+#define MHD_HTTP_HEADER_TRAILER      "Trailer"
+/* Permanent.     RFC-ietf-httpbis-messaging-19, Section 6.1 */
 #define MHD_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
-/* Standard.      RFC7230, Section 6.7 */
-#define MHD_HTTP_HEADER_UPGRADE "Upgrade"
-/* Standard.      RFC7231, Section 5.5.3 */
-#define MHD_HTTP_HEADER_USER_AGENT "User-Agent"
-/* Standard.      RFC7231, Section 7.1.4 */
-#define MHD_HTTP_HEADER_VARY "Vary"
-/* Standard.      RFC7230, Section 5.7.1 */
-#define MHD_HTTP_HEADER_VIA "Via"
-/* Standard.      RFC7235, Section 4.1 */
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 7.8 */
+#define MHD_HTTP_HEADER_UPGRADE      "Upgrade"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 10.1.5 */
+#define MHD_HTTP_HEADER_USER_AGENT   "User-Agent"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 12.5.5 */
+#define MHD_HTTP_HEADER_VARY         "Vary"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 7.6.3 */
+#define MHD_HTTP_HEADER_VIA          "Via"
+/* Obsoleted.     RFC-ietf-httpbis-cache-19, Section 5.5 */
+#define MHD_HTTP_HEADER_WARNING      "Warning"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 11.6.1 */
 #define MHD_HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate"
-/* Standard.      RFC7234, Section 5.5 */
-#define MHD_HTTP_HEADER_WARNING "Warning"
+/* Permanent.     RFC-ietf-httpbis-semantics-19, Section 12.5.5 */
+#define MHD_HTTP_HEADER_ASTERISK     "*"
 
 /* Additional HTTP headers. */
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_A_IM "A-IM"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_A_IM         "A-IM"
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_ACCEPT_ADDITIONS "Accept-Additions"
-/* Experimental.  RFC-ietf-httpbis-client-hints-15, Section 3.1 */
-#define MHD_HTTP_HEADER_ACCEPT_CH "Accept-CH"
-/* Informational. RFC7089 */
+/* Permanent.     RFC8942, Section 3.1 */
+#define MHD_HTTP_HEADER_ACCEPT_CH    "Accept-CH"
+/* Permanent.     RFC7089 */
 #define MHD_HTTP_HEADER_ACCEPT_DATETIME "Accept-Datetime"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_ACCEPT_FEATURES "Accept-Features"
-/* No category.   RFC5789 */
-#define MHD_HTTP_HEADER_ACCEPT_PATCH "Accept-Patch"
-/* Standard.      https://www.w3.org/TR/ldp/ */
-#define MHD_HTTP_HEADER_ACCEPT_POST "Accept-Post"
-/* Standard.      RFC7639, Section 2 */
-#define MHD_HTTP_HEADER_ALPN "ALPN"
-/* Standard.      RFC7838 */
-#define MHD_HTTP_HEADER_ALT_SVC "Alt-Svc"
-/* Standard.      RFC7838 */
-#define MHD_HTTP_HEADER_ALT_USED "Alt-Used"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_ALTERNATES "Alternates"
-/* No category.   RFC4437 */
+/* Permanent.     https://www.w3.org/TR/ldp/ */
+#define MHD_HTTP_HEADER_ACCEPT_POST  "Accept-Post"
+/* Permanent.     RFC7639, Section 2 */
+#define MHD_HTTP_HEADER_ALPN         "ALPN"
+/* Permanent.     RFC7838 */
+#define MHD_HTTP_HEADER_ALT_SVC      "Alt-Svc"
+/* Permanent.     RFC7838 */
+#define MHD_HTTP_HEADER_ALT_USED     "Alt-Used"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_ALTERNATES   "Alternates"
+/* Permanent.     RFC4437 */
 #define MHD_HTTP_HEADER_APPLY_TO_REDIRECT_REF "Apply-To-Redirect-Ref"
-/* Experimental.  RFC8053, Section 4 */
+/* Permanent.     RFC8053, Section 4 */
 #define MHD_HTTP_HEADER_AUTHENTICATION_CONTROL "Authentication-Control"
-/* Standard.      RFC7615, Section 3 */
-#define MHD_HTTP_HEADER_AUTHENTICATION_INFO "Authentication-Info"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_C_EXT "C-Ext"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_C_MAN "C-Man"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_C_OPT "C-Opt"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_C_PEP "C-PEP"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_C_PEP_INFO "C-PEP-Info"
-/* Standard.      RFC8607, Section 5.1 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_C_EXT        "C-Ext"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_C_MAN        "C-Man"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_C_OPT        "C-Opt"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_C_PEP        "C-PEP"
+/* Permanent.     RFC8607, Section 5.1 */
 #define MHD_HTTP_HEADER_CAL_MANAGED_ID "Cal-Managed-ID"
-/* Standard.      RFC7809, Section 7.1 */
+/* Permanent.     RFC7809, Section 7.1 */
 #define MHD_HTTP_HEADER_CALDAV_TIMEZONES "CalDAV-Timezones"
-/* Standard.      RFC8586 */
-#define MHD_HTTP_HEADER_CDN_LOOP "CDN-Loop"
-/* Standard.      RFC8739, Section 3.3 */
+/* Permanent.     RFC8586 */
+#define MHD_HTTP_HEADER_CDN_LOOP     "CDN-Loop"
+/* Permanent.     RFC8739, Section 3.3 */
 #define MHD_HTTP_HEADER_CERT_NOT_AFTER "Cert-Not-After"
-/* Standard.      RFC8739, Section 3.3 */
+/* Permanent.     RFC8739, Section 3.3 */
 #define MHD_HTTP_HEADER_CERT_NOT_BEFORE "Cert-Not-Before"
-/* Obsoleted.     RFC2068; RFC2616 */
-#define MHD_HTTP_HEADER_CONTENT_BASE "Content-Base"
-/* Standard.      RFC6266 */
+/* Permanent.     RFC6266 */
 #define MHD_HTTP_HEADER_CONTENT_DISPOSITION "Content-Disposition"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_CONTENT_ID "Content-ID"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_CONTENT_MD5 "Content-MD5"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_CONTENT_ID   "Content-ID"
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_CONTENT_SCRIPT_TYPE "Content-Script-Type"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_CONTENT_STYLE_TYPE "Content-Style-Type"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_CONTENT_VERSION "Content-Version"
-/* Standard.      RFC6265 */
-#define MHD_HTTP_HEADER_COOKIE "Cookie"
-/* Obsoleted.     RFC2965; RFC6265 */
-#define MHD_HTTP_HEADER_COOKIE2 "Cookie2"
-/* Standard.      RFC5323 */
-#define MHD_HTTP_HEADER_DASL "DASL"
-/* Standard.      RFC4918 */
-#define MHD_HTTP_HEADER_DAV "DAV"
-/* No category.   RFC4229 */
+/* Permanent.     RFC6265 */
+#define MHD_HTTP_HEADER_COOKIE       "Cookie"
+/* Permanent.     
https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header */
+#define MHD_HTTP_HEADER_CROSS_ORIGIN_RESOURCE_POLICY \
+  "Cross-Origin-Resource-Policy"
+/* Permanent.     RFC5323 */
+#define MHD_HTTP_HEADER_DASL         "DASL"
+/* Permanent.     RFC4918 */
+#define MHD_HTTP_HEADER_DAV          "DAV"
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_DEFAULT_STYLE "Default-Style"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_DELTA_BASE "Delta-Base"
-/* Standard.      RFC4918 */
-#define MHD_HTTP_HEADER_DEPTH "Depth"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_DELTA_BASE   "Delta-Base"
+/* Permanent.     RFC4918 */
+#define MHD_HTTP_HEADER_DEPTH        "Depth"
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_DERIVED_FROM "Derived-From"
-/* Standard.      RFC4918 */
-#define MHD_HTTP_HEADER_DESTINATION "Destination"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4918 */
+#define MHD_HTTP_HEADER_DESTINATION  "Destination"
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_DIFFERENTIAL_ID "Differential-ID"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_DIGEST "Digest"
-/* Standard.      RFC8470 */
-#define MHD_HTTP_HEADER_EARLY_DATA "Early-Data"
-/* Experimental.  RFC-ietf-httpbis-expect-ct-08 */
-#define MHD_HTTP_HEADER_EXPECT_CT "Expect-CT"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_EXT "Ext"
-/* Standard.      RFC7239 */
-#define MHD_HTTP_HEADER_FORWARDED "Forwarded"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_GETPROFILE "GetProfile"
-/* Experimental.  RFC7486, Section 6.1.1 */
-#define MHD_HTTP_HEADER_HOBAREG "Hobareg"
-/* Standard.      RFC7540, Section 3.2.1 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_DIGEST       "Digest"
+/* Permanent.     RFC8470 */
+#define MHD_HTTP_HEADER_EARLY_DATA   "Early-Data"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_EXT          "Ext"
+/* Permanent.     RFC7239 */
+#define MHD_HTTP_HEADER_FORWARDED    "Forwarded"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_GETPROFILE   "GetProfile"
+/* Permanent.     RFC7486, Section 6.1.1 */
+#define MHD_HTTP_HEADER_HOBAREG      "Hobareg"
+/* Permanent.     RFC7540, Section 3.2.1 */
 #define MHD_HTTP_HEADER_HTTP2_SETTINGS "HTTP2-Settings"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_IM "IM"
-/* Standard.      RFC4918 */
-#define MHD_HTTP_HEADER_IF "If"
-/* Standard.      RFC6638 */
+/* Permanent.     RFC4918 */
+#define MHD_HTTP_HEADER_IF           "If"
+/* Permanent.     RFC6638 */
 #define MHD_HTTP_HEADER_IF_SCHEDULE_TAG_MATCH "If-Schedule-Tag-Match"
-/* Standard.      RFC8473 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_IM           "IM"
+/* Permanent.     RFC8473 */
 #define MHD_HTTP_HEADER_INCLUDE_REFERRED_TOKEN_BINDING_ID \
   "Include-Referred-Token-Binding-ID"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_KEEP_ALIVE "Keep-Alive"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_LABEL "Label"
-/* Standard.      RFC8288 */
-#define MHD_HTTP_HEADER_LINK "Link"
-/* Standard.      RFC4918 */
-#define MHD_HTTP_HEADER_LOCK_TOKEN "Lock-Token"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_MAN "Man"
-/* Informational. RFC7089 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_KEEP_ALIVE   "Keep-Alive"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_LABEL        "Label"
+/* Permanent.     RFC8288 */
+#define MHD_HTTP_HEADER_LINK         "Link"
+/* Permanent.     RFC4918 */
+#define MHD_HTTP_HEADER_LOCK_TOKEN   "Lock-Token"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_MAN          "Man"
+/* Permanent.     RFC7089 */
 #define MHD_HTTP_HEADER_MEMENTO_DATETIME "Memento-Datetime"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_METER "Meter"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_NEGOTIATE "Negotiate"
-/* Standard.      OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_METER        "Meter"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_NEGOTIATE    "Negotiate"
+/* Permanent.     OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
 #define MHD_HTTP_HEADER_ODATA_ENTITYID "OData-EntityId"
-/* Standard.      OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
+/* Permanent.     OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
 #define MHD_HTTP_HEADER_ODATA_ISOLATION "OData-Isolation"
-/* Standard.      OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
+/* Permanent.     OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
 #define MHD_HTTP_HEADER_ODATA_MAXVERSION "OData-MaxVersion"
-/* Standard.      OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
+/* Permanent.     OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
 #define MHD_HTTP_HEADER_ODATA_VERSION "OData-Version"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_OPT "Opt"
-/* Experimental.  RFC8053, Section 3 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_OPT          "Opt"
+/* Permanent.     RFC8053, Section 3 */
 #define MHD_HTTP_HEADER_OPTIONAL_WWW_AUTHENTICATE "Optional-WWW-Authenticate"
-/* Standard.      RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_ORDERING_TYPE "Ordering-Type"
-/* Standard.      RFC6454 */
-#define MHD_HTTP_HEADER_ORIGIN "Origin"
-/* Standard.      RFC8613, Section 11.1 */
-#define MHD_HTTP_HEADER_OSCORE "OSCORE"
-/* Standard.      RFC4918 */
-#define MHD_HTTP_HEADER_OVERWRITE "Overwrite"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_P3P "P3P"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_PEP "PEP"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_PICS_LABEL "PICS-Label"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_PEP_INFO "Pep-Info"
-/* Standard.      RFC4229 */
-#define MHD_HTTP_HEADER_POSITION "Position"
-/* Standard.      RFC7240 */
-#define MHD_HTTP_HEADER_PREFER "Prefer"
-/* Standard.      RFC7240 */
+/* Permanent.     RFC6454 */
+#define MHD_HTTP_HEADER_ORIGIN       "Origin"
+/* Permanent.     RFC8613, Section 11.1 */
+#define MHD_HTTP_HEADER_OSCORE       "OSCORE"
+/* Permanent.     RFC4918 */
+#define MHD_HTTP_HEADER_OVERWRITE    "Overwrite"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_P3P          "P3P"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_PEP          "PEP"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_PEP_INFO     "Pep-Info"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_PICS_LABEL   "PICS-Label"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_POSITION     "Position"
+/* Permanent.     RFC7240 */
+#define MHD_HTTP_HEADER_PREFER       "Prefer"
+/* Permanent.     RFC7240 */
 #define MHD_HTTP_HEADER_PREFERENCE_APPLIED "Preference-Applied"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_PROFILEOBJECT "ProfileObject"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_PROTOCOL "Protocol"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_PROTOCOL_INFO "Protocol-Info"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_PROTOCOL_QUERY "Protocol-Query"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_PROTOCOL     "Protocol"
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_PROTOCOL_REQUEST "Protocol-Request"
-/* Standard.      RFC7615, Section 4 */
-#define MHD_HTTP_HEADER_PROXY_AUTHENTICATION_INFO "Proxy-Authentication-Info"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_PROXY_FEATURES "Proxy-Features"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_PROXY_INSTRUCTION "Proxy-Instruction"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_PUBLIC "Public"
-/* Standard.      RFC7469 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_PUBLIC       "Public"
+/* Permanent.     RFC7469 */
 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS "Public-Key-Pins"
-/* Standard.      RFC7469 */
+/* Permanent.     RFC7469 */
 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS_REPORT_ONLY \
   "Public-Key-Pins-Report-Only"
-/* No category.   RFC4437 */
+/* Permanent.     RFC4437 */
 #define MHD_HTTP_HEADER_REDIRECT_REF "Redirect-Ref"
-/* Standard.      RFC8555, Section 6.5.1 */
+/* Permanent.     RFC8555, Section 6.5.1 */
 #define MHD_HTTP_HEADER_REPLAY_NONCE "Replay-Nonce"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_SAFE "Safe"
-/* Standard.      RFC6638 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_SAFE         "Safe"
+/* Permanent.     RFC6638 */
 #define MHD_HTTP_HEADER_SCHEDULE_REPLY "Schedule-Reply"
-/* Standard.      RFC6638 */
+/* Permanent.     RFC6638 */
 #define MHD_HTTP_HEADER_SCHEDULE_TAG "Schedule-Tag"
-/* Standard.      RFC8473 */
+/* Permanent.     RFC8473 */
 #define MHD_HTTP_HEADER_SEC_TOKEN_BINDING "Sec-Token-Binding"
-/* Standard.      RFC6455 */
+/* Permanent.     RFC6455 */
 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_ACCEPT "Sec-WebSocket-Accept"
-/* Standard.      RFC6455 */
+/* Permanent.     RFC6455 */
 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_EXTENSIONS "Sec-WebSocket-Extensions"
-/* Standard.      RFC6455 */
+/* Permanent.     RFC6455 */
 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY "Sec-WebSocket-Key"
-/* Standard.      RFC6455 */
+/* Permanent.     RFC6455 */
 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_PROTOCOL "Sec-WebSocket-Protocol"
-/* Standard.      RFC6455 */
+/* Permanent.     RFC6455 */
 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION "Sec-WebSocket-Version"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_SECURITY_SCHEME "Security-Scheme"
-/* Standard.      RFC6265 */
-#define MHD_HTTP_HEADER_SET_COOKIE "Set-Cookie"
-/* Obsoleted.     RFC2965; RFC6265 */
-#define MHD_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_SETPROFILE "SetProfile"
-/* Standard.      RFC5023 */
-#define MHD_HTTP_HEADER_SLUG "SLUG"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_SOAPACTION "SoapAction"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_STATUS_URI "Status-URI"
-/* Standard.      RFC6797 */
+/* Permanent.     RFC6265 */
+#define MHD_HTTP_HEADER_SET_COOKIE   "Set-Cookie"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_SETPROFILE   "SetProfile"
+/* Permanent.     RFC5023 */
+#define MHD_HTTP_HEADER_SLUG         "SLUG"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_SOAPACTION   "SoapAction"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_STATUS_URI   "Status-URI"
+/* Permanent.     RFC6797 */
 #define MHD_HTTP_HEADER_STRICT_TRANSPORT_SECURITY "Strict-Transport-Security"
-/* Informational. RFC8594 */
-#define MHD_HTTP_HEADER_SUNSET "Sunset"
-/* No category.   RFC4229 */
+/* Permanent.     RFC8594 */
+#define MHD_HTTP_HEADER_SUNSET       "Sunset"
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_SURROGATE_CAPABILITY "Surrogate-Capability"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_SURROGATE_CONTROL "Surrogate-Control"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_TCN "TCN"
-/* Standard.      RFC4918 */
-#define MHD_HTTP_HEADER_TIMEOUT "Timeout"
-/* Standard.      RFC8030, Section 5.4 */
-#define MHD_HTTP_HEADER_TOPIC "Topic"
-/* Standard.      RFC8030, Section 5.2 */
-#define MHD_HTTP_HEADER_TTL "TTL"
-/* Standard.      RFC8030, Section 5.3 */
-#define MHD_HTTP_HEADER_URGENCY "Urgency"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_URI "URI"
-/* No category.   RFC4229 */
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_TCN          "TCN"
+/* Permanent.     RFC4918 */
+#define MHD_HTTP_HEADER_TIMEOUT      "Timeout"
+/* Permanent.     RFC8030, Section 5.4 */
+#define MHD_HTTP_HEADER_TOPIC        "Topic"
+/* Permanent.     RFC8030, Section 5.2 */
+#define MHD_HTTP_HEADER_TTL          "TTL"
+/* Permanent.     RFC8030, Section 5.3 */
+#define MHD_HTTP_HEADER_URGENCY      "Urgency"
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_URI          "URI"
+/* Permanent.     RFC4229 */
 #define MHD_HTTP_HEADER_VARIANT_VARY "Variant-Vary"
-/* No category.   RFC4229 */
-#define MHD_HTTP_HEADER_WANT_DIGEST "Want-Digest"
-/* Standard.      https://fetch.spec.whatwg.org/#x-content-type-options-header 
*/
+/* Permanent.     RFC4229 */
+#define MHD_HTTP_HEADER_WANT_DIGEST  "Want-Digest"
+/* Permanent.     https://fetch.spec.whatwg.org/#x-content-type-options-header 
*/
 #define MHD_HTTP_HEADER_X_CONTENT_TYPE_OPTIONS "X-Content-Type-Options"
-/* Informational. RFC7034 */
+/* Permanent.     RFC7034 */
 #define MHD_HTTP_HEADER_X_FRAME_OPTIONS "X-Frame-Options"
+/* Provisional.   RFC5789 */
+#define MHD_HTTP_HEADER_ACCEPT_PATCH "Accept-Patch"
+/* Provisional.   W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS \
+  "Access-Control-Allow-Credentials"
+/* Provisional.   W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_HEADERS \
+  "Access-Control-Allow-Headers"
+/* Provisional.   W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_METHODS \
+  "Access-Control-Allow-Methods"
+/* Provisional.   W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN \
+  "Access-Control-Allow-Origin"
+/* Provisional.   W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_ACCESS_CONTROL_MAX_AGE "Access-Control-Max-Age"
+/* Provisional.   W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_ACCESS_CONTROL_REQUEST_HEADERS \
+  "Access-Control-Request-Headers"
+/* Provisional.   W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_ACCESS_CONTROL_REQUEST_METHOD \
+  "Access-Control-Request-Method"
+/* Provisional.   
https://github.com/ampproject/amphtml/blob/master/spec/amp-cache-transform.md */
+#define MHD_HTTP_HEADER_AMP_CACHE_TRANSFORM "AMP-Cache-Transform"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_COMPLIANCE   "Compliance"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_CONTENT_TRANSFER_ENCODING "Content-Transfer-Encoding"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_COST         "Cost"
+/* Provisional.   RFC6017 */
+#define MHD_HTTP_HEADER_EDIINT_FEATURES "EDIINT-Features"
+/* Provisional.   OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
+#define MHD_HTTP_HEADER_ISOLATION    "Isolation"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_MESSAGE_ID   "Message-ID"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_NON_COMPLIANCE "Non-Compliance"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_OPTIONAL     "Optional"
+/* Provisional.   OASIS Project Specification 01; OASIS; Chet_Ensign */
+#define MHD_HTTP_HEADER_OSLC_CORE_VERSION "OSLC-Core-Version"
+/* Provisional.   Repeatable Requests Version 1.0; OASIS; Chet_Ensign */
+#define MHD_HTTP_HEADER_REPEATABILITY_CLIENT_ID "Repeatability-Client-ID"
+/* Provisional.   Repeatable Requests Version 1.0; OASIS; Chet_Ensign */
+#define MHD_HTTP_HEADER_REPEATABILITY_FIRST_SENT "Repeatability-First-Sent"
+/* Provisional.   Repeatable Requests Version 1.0; OASIS; Chet_Ensign */
+#define MHD_HTTP_HEADER_REPEATABILITY_REQUEST_ID "Repeatability-Request-ID"
+/* Provisional.   Repeatable Requests Version 1.0; OASIS; Chet_Ensign */
+#define MHD_HTTP_HEADER_REPEATABILITY_RESULT "Repeatability-Result"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_RESOLUTION_HINT "Resolution-Hint"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_RESOLVER_LOCATION "Resolver-Location"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_SUBOK        "SubOK"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_SUBST        "Subst"
+/* Provisional.   https://www.w3.org/TR/resource-timing-1/#timing-allow-origin 
*/
+#define MHD_HTTP_HEADER_TIMING_ALLOW_ORIGIN "Timing-Allow-Origin"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_TITLE        "Title"
+/* Provisional.   https://www.w3.org/TR/trace-context/#traceparent-field */
+#define MHD_HTTP_HEADER_TRACEPARENT  "Traceparent"
+/* Provisional.   https://www.w3.org/TR/trace-context/#tracestate-field */
+#define MHD_HTTP_HEADER_TRACESTATE   "Tracestate"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_UA_COLOR     "UA-Color"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_UA_MEDIA     "UA-Media"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_UA_PIXELS    "UA-Pixels"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_UA_RESOLUTION "UA-Resolution"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_UA_WINDOWPIXELS "UA-Windowpixels"
+/* Provisional.   RFC4229 */
+#define MHD_HTTP_HEADER_VERSION      "Version"
+/* Provisional.   W3C Mobile Web Best Practices Working Group */
+#define MHD_HTTP_HEADER_X_DEVICE_ACCEPT "X-Device-Accept"
+/* Provisional.   W3C Mobile Web Best Practices Working Group */
+#define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_CHARSET "X-Device-Accept-Charset"
+/* Provisional.   W3C Mobile Web Best Practices Working Group */
+#define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_ENCODING "X-Device-Accept-Encoding"
+/* Provisional.   W3C Mobile Web Best Practices Working Group */
+#define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_LANGUAGE "X-Device-Accept-Language"
+/* Provisional.   W3C Mobile Web Best Practices Working Group */
+#define MHD_HTTP_HEADER_X_DEVICE_USER_AGENT "X-Device-User-Agent"
+/* Deprecated.    W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_ACCESS_CONTROL "Access-Control"
+/* Deprecated.    RFC4229 */
+#define MHD_HTTP_HEADER_C_PEP_INFO   "C-PEP-Info"
+/* Deprecated.    W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_METHOD_CHECK "Method-Check"
+/* Deprecated.    W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_METHOD_CHECK_EXPIRES "Method-Check-Expires"
+/* Deprecated.    RFC4229 */
+#define MHD_HTTP_HEADER_PROTOCOL_INFO "Protocol-Info"
+/* Deprecated.    RFC4229 */
+#define MHD_HTTP_HEADER_PROTOCOL_QUERY "Protocol-Query"
+/* Deprecated.    W3C Web Application Formats Working Group */
+#define MHD_HTTP_HEADER_REFERER_ROOT "Referer-Root"
+/* Obsoleted.     RFC2068; RFC2616 */
+#define MHD_HTTP_HEADER_CONTENT_BASE "Content-Base"
+/* Obsoleted.     RFC2616, Section 14.15; RFC7231, Appendix B */
+#define MHD_HTTP_HEADER_CONTENT_MD5  "Content-MD5"
+/* Obsoleted.     RFC2965; RFC6265 */
+#define MHD_HTTP_HEADER_COOKIE2      "Cookie2"
+/* Obsoleted.     RFC2965; RFC6265 */
+#define MHD_HTTP_HEADER_SET_COOKIE2  "Set-Cookie2"
 
 /* Some provisional headers. */
 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN \
@@ -929,87 +1045,89 @@ MHD_get_reason_phrase_len_for (unsigned int code);
  * @defgroup methods HTTP methods
  * HTTP methods (as strings).
  * See: http://www.iana.org/assignments/http-methods/http-methods.xml
- * Registry export date: 2020-09-20
+ * Registry export date: 2021-10-30
  * @{
  */
 
 /* Main HTTP methods. */
-/* Not safe. Not idempotent. RFC7231, Section 4.3.6. */
-#define MHD_HTTP_METHOD_CONNECT "CONNECT"
-/* Not safe. Idempotent.     RFC7231, Section 4.3.5. */
-#define MHD_HTTP_METHOD_DELETE "DELETE"
-/* Safe.     Idempotent.     RFC7231, Section 4.3.1. */
-#define MHD_HTTP_METHOD_GET "GET"
-/* Safe.     Idempotent.     RFC7231, Section 4.3.2. */
-#define MHD_HTTP_METHOD_HEAD "HEAD"
-/* Safe.     Idempotent.     RFC7231, Section 4.3.7. */
-#define MHD_HTTP_METHOD_OPTIONS "OPTIONS"
-/* Not safe. Not idempotent. RFC7231, Section 4.3.3. */
-#define MHD_HTTP_METHOD_POST "POST"
-/* Not safe. Idempotent.     RFC7231, Section 4.3.4. */
-#define MHD_HTTP_METHOD_PUT "PUT"
-/* Safe.     Idempotent.     RFC7231, Section 4.3.8. */
-#define MHD_HTTP_METHOD_TRACE "TRACE"
+/* Not safe. Not idempotent. RFC-ietf-httpbis-semantics, Section 9.3.6. */
+#define MHD_HTTP_METHOD_CONNECT  "CONNECT"
+/* Not safe. Idempotent.     RFC-ietf-httpbis-semantics, Section 9.3.5. */
+#define MHD_HTTP_METHOD_DELETE   "DELETE"
+/* Safe.     Idempotent.     RFC-ietf-httpbis-semantics, Section 9.3.1. */
+#define MHD_HTTP_METHOD_GET      "GET"
+/* Safe.     Idempotent.     RFC-ietf-httpbis-semantics, Section 9.3.2. */
+#define MHD_HTTP_METHOD_HEAD     "HEAD"
+/* Safe.     Idempotent.     RFC-ietf-httpbis-semantics, Section 9.3.7. */
+#define MHD_HTTP_METHOD_OPTIONS  "OPTIONS"
+/* Not safe. Not idempotent. RFC-ietf-httpbis-semantics, Section 9.3.3. */
+#define MHD_HTTP_METHOD_POST     "POST"
+/* Not safe. Idempotent.     RFC-ietf-httpbis-semantics, Section 9.3.4. */
+#define MHD_HTTP_METHOD_PUT      "PUT"
+/* Safe.     Idempotent.     RFC-ietf-httpbis-semantics, Section 9.3.8. */
+#define MHD_HTTP_METHOD_TRACE    "TRACE"
+/* Not safe. Not idempotent. RFC-ietf-httpbis-semantics, Section 18.2. */
+#define MHD_HTTP_METHOD_ASTERISK "*"
 
 /* Additional HTTP methods. */
 /* Not safe. Idempotent.     RFC3744, Section 8.1. */
-#define MHD_HTTP_METHOD_ACL "ACL"
+#define MHD_HTTP_METHOD_ACL            "ACL"
 /* Not safe. Idempotent.     RFC3253, Section 12.6. */
 #define MHD_HTTP_METHOD_BASELINE_CONTROL "BASELINE-CONTROL"
 /* Not safe. Idempotent.     RFC5842, Section 4. */
-#define MHD_HTTP_METHOD_BIND "BIND"
+#define MHD_HTTP_METHOD_BIND           "BIND"
 /* Not safe. Idempotent.     RFC3253, Section 4.4, Section 9.4. */
-#define MHD_HTTP_METHOD_CHECKIN "CHECKIN"
+#define MHD_HTTP_METHOD_CHECKIN        "CHECKIN"
 /* Not safe. Idempotent.     RFC3253, Section 4.3, Section 8.8. */
-#define MHD_HTTP_METHOD_CHECKOUT "CHECKOUT"
+#define MHD_HTTP_METHOD_CHECKOUT       "CHECKOUT"
 /* Not safe. Idempotent.     RFC4918, Section 9.8. */
-#define MHD_HTTP_METHOD_COPY "COPY"
+#define MHD_HTTP_METHOD_COPY           "COPY"
 /* Not safe. Idempotent.     RFC3253, Section 8.2. */
-#define MHD_HTTP_METHOD_LABEL "LABEL"
+#define MHD_HTTP_METHOD_LABEL          "LABEL"
 /* Not safe. Idempotent.     RFC2068, Section 19.6.1.2. */
-#define MHD_HTTP_METHOD_LINK "LINK"
+#define MHD_HTTP_METHOD_LINK           "LINK"
 /* Not safe. Not idempotent. RFC4918, Section 9.10. */
-#define MHD_HTTP_METHOD_LOCK "LOCK"
+#define MHD_HTTP_METHOD_LOCK           "LOCK"
 /* Not safe. Idempotent.     RFC3253, Section 11.2. */
-#define MHD_HTTP_METHOD_MERGE "MERGE"
+#define MHD_HTTP_METHOD_MERGE          "MERGE"
 /* Not safe. Idempotent.     RFC3253, Section 13.5. */
-#define MHD_HTTP_METHOD_MKACTIVITY "MKACTIVITY"
+#define MHD_HTTP_METHOD_MKACTIVITY     "MKACTIVITY"
 /* Not safe. Idempotent.     RFC4791, Section 5.3.1; RFC8144, Section 2.3. */
-#define MHD_HTTP_METHOD_MKCALENDAR "MKCALENDAR"
+#define MHD_HTTP_METHOD_MKCALENDAR     "MKCALENDAR"
 /* Not safe. Idempotent.     RFC4918, Section 9.3; RFC5689, Section 3; 
RFC8144, Section 2.3. */
-#define MHD_HTTP_METHOD_MKCOL "MKCOL"
+#define MHD_HTTP_METHOD_MKCOL          "MKCOL"
 /* Not safe. Idempotent.     RFC4437, Section 6. */
-#define MHD_HTTP_METHOD_MKREDIRECTREF "MKREDIRECTREF"
+#define MHD_HTTP_METHOD_MKREDIRECTREF  "MKREDIRECTREF"
 /* Not safe. Idempotent.     RFC3253, Section 6.3. */
-#define MHD_HTTP_METHOD_MKWORKSPACE "MKWORKSPACE"
+#define MHD_HTTP_METHOD_MKWORKSPACE    "MKWORKSPACE"
 /* Not safe. Idempotent.     RFC4918, Section 9.9. */
-#define MHD_HTTP_METHOD_MOVE "MOVE"
+#define MHD_HTTP_METHOD_MOVE           "MOVE"
 /* Not safe. Idempotent.     RFC3648, Section 7. */
-#define MHD_HTTP_METHOD_ORDERPATCH "ORDERPATCH"
+#define MHD_HTTP_METHOD_ORDERPATCH     "ORDERPATCH"
 /* Not safe. Not idempotent. RFC5789, Section 2. */
-#define MHD_HTTP_METHOD_PATCH "PATCH"
+#define MHD_HTTP_METHOD_PATCH          "PATCH"
 /* Safe.     Idempotent.     RFC7540, Section 3.5. */
-#define MHD_HTTP_METHOD_PRI "PRI"
+#define MHD_HTTP_METHOD_PRI            "PRI"
 /* Safe.     Idempotent.     RFC4918, Section 9.1; RFC8144, Section 2.1. */
-#define MHD_HTTP_METHOD_PROPFIND "PROPFIND"
+#define MHD_HTTP_METHOD_PROPFIND       "PROPFIND"
 /* Not safe. Idempotent.     RFC4918, Section 9.2; RFC8144, Section 2.2. */
-#define MHD_HTTP_METHOD_PROPPATCH "PROPPATCH"
+#define MHD_HTTP_METHOD_PROPPATCH      "PROPPATCH"
 /* Not safe. Idempotent.     RFC5842, Section 6. */
-#define MHD_HTTP_METHOD_REBIND "REBIND"
+#define MHD_HTTP_METHOD_REBIND         "REBIND"
 /* Safe.     Idempotent.     RFC3253, Section 3.6; RFC8144, Section 2.1. */
-#define MHD_HTTP_METHOD_REPORT "REPORT"
+#define MHD_HTTP_METHOD_REPORT         "REPORT"
 /* Safe.     Idempotent.     RFC5323, Section 2. */
-#define MHD_HTTP_METHOD_SEARCH "SEARCH"
+#define MHD_HTTP_METHOD_SEARCH         "SEARCH"
 /* Not safe. Idempotent.     RFC5842, Section 5. */
-#define MHD_HTTP_METHOD_UNBIND "UNBIND"
+#define MHD_HTTP_METHOD_UNBIND         "UNBIND"
 /* Not safe. Idempotent.     RFC3253, Section 4.5. */
-#define MHD_HTTP_METHOD_UNCHECKOUT "UNCHECKOUT"
+#define MHD_HTTP_METHOD_UNCHECKOUT     "UNCHECKOUT"
 /* Not safe. Idempotent.     RFC2068, Section 19.6.1.3. */
-#define MHD_HTTP_METHOD_UNLINK "UNLINK"
+#define MHD_HTTP_METHOD_UNLINK         "UNLINK"
 /* Not safe. Idempotent.     RFC4918, Section 9.11. */
-#define MHD_HTTP_METHOD_UNLOCK "UNLOCK"
+#define MHD_HTTP_METHOD_UNLOCK         "UNLOCK"
 /* Not safe. Idempotent.     RFC3253, Section 7.1. */
-#define MHD_HTTP_METHOD_UPDATE "UPDATE"
+#define MHD_HTTP_METHOD_UPDATE         "UPDATE"
 /* Not safe. Idempotent.     RFC4437, Section 7. */
 #define MHD_HTTP_METHOD_UPDATEREDIRECTREF "UPDATEREDIRECTREF"
 /* Not safe. Idempotent.     RFC3253, Section 3.5. */
@@ -2601,7 +2719,7 @@ MHD_add_connection (struct MHD_Daemon *daemon,
  * before calling this function. FD_SETSIZE is assumed
  * to be platform's default.
  *
- * This function should only be called in when MHD is configured to
+ * This function should only be called only when MHD is configured to
  * use "external" sockets polling with 'select()' or with 'epoll'.
  * In the latter case, it will only add the single 'epoll' file
  * descriptor used by MHD to the sets.
@@ -2642,7 +2760,7 @@ MHD_get_fdset (struct MHD_Daemon *daemon,
  * Passing custom FD_SETSIZE as @a fd_setsize allow usage of
  * larger/smaller than platform's default fd_sets.
  *
- * This function should only be called in when MHD is configured to
+ * This function should only be called only when MHD is configured to
  * use "external" sockets polling with 'select()' or with 'epoll'.
  * In the latter case, it will only add the single 'epoll' file
  * descriptor used by MHD to the sets.
@@ -2683,7 +2801,7 @@ MHD_get_fdset2 (struct MHD_Daemon *daemon,
  * before calling this function. Size of fd_set is
  * determined by current value of FD_SETSIZE.
  *
- * This function should only be called in when MHD is configured to
+ * This function should only be called only when MHD is configured to
  * use "external" sockets polling with 'select()' or with 'epoll'.
  * In the latter case, it will only add the single 'epoll' file
  * descriptor used by MHD to the sets.
@@ -3120,7 +3238,7 @@ enum MHD_ResponseFlags
   /**
    * Only respond in conservative (dumb) HTTP/1.0-compatible mode.
    * Response still use HTTP/1.1 version in header, but always close
-   * the connection after generating the response and do not use chunked
+   * the connection after sending the response and do not use chunked
    * encoding for the response.
    * You can also set the #MHD_RF_HTTP_1_0_SERVER flag to force
    * HTTP/1.0 version in the response.
@@ -3146,8 +3264,8 @@ enum MHD_ResponseFlags
    * Chunked encoding will not be used for the response.
    * Due to backward compatibility, responses still can be used with
    * HTTP/1.1 clients.
-   * This option can be used to emulate HTTP/1.0 server (for response only
-   * as chunked encoding in requests will be supported still).
+   * This option can be used to emulate HTTP/1.0 server (for response part
+   * only as chunked encoding in requests (if any) is processed by MHD).
    * @note Available since #MHD_VERSION 0x00097308
    */
   MHD_RF_HTTP_1_0_SERVER = 1 << 1,
@@ -3704,10 +3822,12 @@ MHD_destroy_response (struct MHD_Response *response);
  *   encoding, however for HTTP/1.0 clients chunked encoding will not be used
  *   and manually set "Transfer-Encoding" header is automatically removed
  *   for HTTP/1.0 clients
- * + "Connection" is added automatically with value "Keep-Alive" or "Close".
- *   The header "Connection" with value "Close" could be set by this function
- *   to enforce closure of the connection after sending this response.
- *   "Keep-Alive" cannot be enforced and will be removed automatically.
+ * + "Connection" may be added automatically with value "Keep-Alive" (only
+ *   for HTTP/1.0 clients) or "Close". The header "Connection" with value
+ *   "Close" could be set by this function to enforce closure of
+ *   the connection after sending this response. "Keep-Alive" cannot be
+ *   enforced and will be removed automatically.
+ *   @see #MHD_RF_SEND_KEEP_ALIVE_HEADER
  *
  * Some headers are pre-processed by this function:
  * * "Connection" headers are combined into single header entry, value is
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index 405f4735..1ae2b3f3 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -94,8 +94,6 @@ libmicrohttpd_la_LIBADD = \
   $(MHD_LIBDEPS) $(MHD_TLS_LIBDEPS)
 
 
-
-
 if HAVE_W32
 MHD_DLL_RES_SRC = microhttpd_dll_res.rc
 MHD_DLL_RES_LO = libmicrohttpd_la-$(MHD_DLL_RES_SRC:.rc=.lo)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 33d54234..1792d678 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1294,6 +1294,9 @@ keepalive_possible (struct MHD_Connection *connection)
     mhd_assert (0 == (r->flags_auto & MHD_RAF_HAS_CONNECTION_CLOSE));
     /* Valid HTTP version is enforced by 'MHD_queue_response()' */
     mhd_assert (MHD_IS_HTTP_VER_SUPPORTED (c->http_ver));
+    /* TODO: Enable assert when MHD will allow early response */
+    /* TODO: Add 'early_response' */
+    /* mhd_assert (! c->stop_with_error); */
     return MHD_CONN_MUST_UPGRADE;
   }
 #endif /* UPGRADE_SUPPORT */
@@ -1389,7 +1392,9 @@ get_date_str (char *date)
   date[3] = ',';
   date[4] = ' ';
   /* Day of the month */
-  MHD_uint8_to_str_pad ((uint8_t) now.tm_mday, 2, date + 5, buf_len - 5);
+  if (2 != MHD_uint8_to_str_pad ((uint8_t) now.tm_mday, 2,
+                                 date + 5, buf_len - 5))
+    return false;
   date[7] = ' ';
   /* Month */
   src = mons[now.tm_mon % 12];
@@ -1564,13 +1569,14 @@ connection_maximize_write_buffer (struct MHD_Connection 
*connection)
   if (0 != free_size)
   {
     new_size = c->write_buffer_size + free_size;
+    /* This function must not move the buffer position.
+     * MHD_pool_reallocate () may return the new position only if buffer was
+     * allocated 'from_end' or is not the last allocation,
+     * which should not happen. */
     new_buf = MHD_pool_reallocate (pool,
                                    c->write_buffer,
                                    c->write_buffer_size,
                                    new_size);
-    /* Buffer position must not be moved.
-     * Position could be moved only if buffer was allocated 'from_end',
-     * which cannot happen. */
     mhd_assert ((c->write_buffer == new_buf) || (NULL == c->write_buffer));
     c->write_buffer = new_buf;
     c->write_buffer_size = new_size;
@@ -1754,7 +1760,7 @@ setup_reply_properties (struct MHD_Connection *connection)
   {
     if ((MHD_SIZE_UNKNOWN == r->total_size) ||
         (0 != (r->flags_auto & MHD_RAF_HAS_TRANS_ENC_CHUNKED)))
-    { /* Chunked reply encoding is needed if possible */
+    { /* Use chunked reply encoding if possible */
 
       /* Check whether chunked encoding is supported by the client */
       if (! MHD_IS_HTTP_VER_1_1_COMPAT (c->http_ver))
@@ -1781,7 +1787,7 @@ setup_reply_properties (struct MHD_Connection *connection)
     }
   }
   else
-    use_chunked = false; /* Actually it must not be used without body */
+    use_chunked = false; /* chunked encoding cannot be used without body */
 
   c->rp_props.chunked = use_chunked;
   c->rp_props.set = true;
@@ -1838,7 +1844,7 @@ buffer_append (char *buf,
  * @param buf_size the size of the @a buf
  * @param response the response
  * @param kind the kind of objects (headers or footers)
- * @param filter_transf_enc skip "Transfer-Encoding" header
+ * @param filter_transf_enc skip "Transfer-Encoding" header if any
  * @param add_close add "close" token to the
  *                  "Connection:" header (if any), ignored if no "Connection:"
  *                  header was added by user or if "close" token is already
@@ -1903,7 +1909,8 @@ add_user_headers (char *buf,
     buf[(*ppos)++] = ':';
     buf[(*ppos)++] = ' ';
     if (add_close || add_keep_alive)
-    { /* "Connection:" header must be always the first one */
+    {
+      /* "Connection:" header must be always the first one */
       mhd_assert (MHD_str_equal_caseless_n_ (hdr->header, \
                                              MHD_HTTP_HEADER_CONNECTION, \
                                              hdr->header_size));
@@ -2090,6 +2097,7 @@ build_header_response (struct MHD_Connection *connection)
   }
   /* The "Connection:" header */
   mhd_assert (! use_conn_close || ! use_conn_k_alive);
+  mhd_assert (! use_conn_k_alive || ! use_conn_close);
   if (0 == (r->flags_auto & MHD_RAF_HAS_CONNECTION_HDR))
   {
     if (use_conn_close)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d022247d..1c115657 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -700,8 +700,8 @@ MHD_TLS_init (struct MHD_Daemon *daemon)
  * before calling this function. FD_SETSIZE is assumed
  * to be platform's default.
  *
- * This function should only be called in when MHD is configured to
- * use external select with 'select()' or with 'epoll'.
+ * This function should only be called only when MHD is configured to
+ * use "external" sockets polling with 'select()' or with 'epoll'.
  * In the latter case, it will only add the single 'epoll' file
  * descriptor used by MHD to the sets.
  * It's necessary to use #MHD_get_timeout() to get maximum timeout
@@ -1107,8 +1107,8 @@ internal_get_fdset2 (struct MHD_Daemon *daemon,
  * Passing custom FD_SETSIZE as @a fd_setsize allow usage of
  * larger/smaller than platform's default fd_sets.
  *
- * This function should only be called in when MHD is configured to
- * use external select with 'select()' or with 'epoll'.
+ * This function should only be called only when MHD is configured to
+ * use "external" sockets polling with 'select()' or with 'epoll'.
  * In the latter case, it will only add the single 'epoll' file
  * descriptor used by MHD to the sets.
  * It's necessary to use #MHD_get_timeout() to get maximum timeout
diff --git a/src/microhttpd/reason_phrase.c b/src/microhttpd/reason_phrase.c
index 969cf95a..9a07b2ad 100644
--- a/src/microhttpd/reason_phrase.c
+++ b/src/microhttpd/reason_phrase.c
@@ -37,20 +37,20 @@ static const struct _MHD_str_w_len invalid_hundred[] = {
 };
 
 static const struct _MHD_str_w_len one_hundred[] = {
-  /* 100 */ _MHD_S_STR_W_LEN ("Continue"),       /* RFC7231, Section 6.2.1 */
-  /* 101 */ _MHD_S_STR_W_LEN ("Switching Protocols"), /* RFC7231, Section 
6.2.2 */
+  /* 100 */ _MHD_S_STR_W_LEN ("Continue"),       /* 
RFC-ietf-httpbis-semantics, Section 15.2.1 */
+  /* 101 */ _MHD_S_STR_W_LEN ("Switching Protocols"), /* 
RFC-ietf-httpbis-semantics, Section 15.2.2 */
   /* 102 */ _MHD_S_STR_W_LEN ("Processing"),     /* RFC2518 */
   /* 103 */ _MHD_S_STR_W_LEN ("Early Hints")     /* RFC8297 */
 };
 
 static const struct _MHD_str_w_len two_hundred[] = {
-  /* 200 */ _MHD_S_STR_W_LEN ("OK"),             /* RFC7231, Section 6.3.1 */
-  /* 201 */ _MHD_S_STR_W_LEN ("Created"),        /* RFC7231, Section 6.3.2 */
-  /* 202 */ _MHD_S_STR_W_LEN ("Accepted"),       /* RFC7231, Section 6.3.3 */
-  /* 203 */ _MHD_S_STR_W_LEN ("Non-Authoritative Information"), /* RFC7231, 
Section 6.3.4 */
-  /* 204 */ _MHD_S_STR_W_LEN ("No Content"),     /* RFC7231, Section 6.3.5 */
-  /* 205 */ _MHD_S_STR_W_LEN ("Reset Content"),  /* RFC7231, Section 6.3.6 */
-  /* 206 */ _MHD_S_STR_W_LEN ("Partial Content"), /* RFC7233, Section 4.1 */
+  /* 200 */ _MHD_S_STR_W_LEN ("OK"),             /* 
RFC-ietf-httpbis-semantics, Section 15.3.1 */
+  /* 201 */ _MHD_S_STR_W_LEN ("Created"),        /* 
RFC-ietf-httpbis-semantics, Section 15.3.2 */
+  /* 202 */ _MHD_S_STR_W_LEN ("Accepted"),       /* 
RFC-ietf-httpbis-semantics, Section 15.3.3 */
+  /* 203 */ _MHD_S_STR_W_LEN ("Non-Authoritative Information"), /* 
RFC-ietf-httpbis-semantics, Section 15.3.4 */
+  /* 204 */ _MHD_S_STR_W_LEN ("No Content"),     /* 
RFC-ietf-httpbis-semantics, Section 15.3.5 */
+  /* 205 */ _MHD_S_STR_W_LEN ("Reset Content"),  /* 
RFC-ietf-httpbis-semantics, Section 15.3.6 */
+  /* 206 */ _MHD_S_STR_W_LEN ("Partial Content"), /* 
RFC-ietf-httpbis-semantics, Section 15.3.7 */
   /* 207 */ _MHD_S_STR_W_LEN ("Multi-Status"),   /* RFC4918 */
   /* 208 */ _MHD_S_STR_W_LEN ("Already Reported"), /* RFC5842 */
   /* 209 */ {"Unknown", 0},                      /* Not used */
@@ -74,45 +74,45 @@ static const struct _MHD_str_w_len two_hundred[] = {
 };
 
 static const struct _MHD_str_w_len three_hundred[] = {
-  /* 300 */ _MHD_S_STR_W_LEN ("Multiple Choices"), /* RFC7231, Section 6.4.1 */
-  /* 301 */ _MHD_S_STR_W_LEN ("Moved Permanently"), /* RFC7231, Section 6.4.2 
*/
-  /* 302 */ _MHD_S_STR_W_LEN ("Found"),          /* RFC7231, Section 6.4.3 */
-  /* 303 */ _MHD_S_STR_W_LEN ("See Other"),      /* RFC7231, Section 6.4.4 */
-  /* 304 */ _MHD_S_STR_W_LEN ("Not Modified"),   /* RFC7232, Section 4.1 */
-  /* 305 */ _MHD_S_STR_W_LEN ("Use Proxy"),      /* RFC7231, Section 6.4.5 */
-  /* 306 */ _MHD_S_STR_W_LEN ("Switch Proxy"),   /* Not used! RFC7231, Section 
6.4.6 */
-  /* 307 */ _MHD_S_STR_W_LEN ("Temporary Redirect"), /* RFC7231, Section 6.4.7 
*/
-  /* 308 */ _MHD_S_STR_W_LEN ("Permanent Redirect") /* RFC7538 */
+  /* 300 */ _MHD_S_STR_W_LEN ("Multiple Choices"), /* 
RFC-ietf-httpbis-semantics, Section 15.4.1 */
+  /* 301 */ _MHD_S_STR_W_LEN ("Moved Permanently"), /* 
RFC-ietf-httpbis-semantics, Section 15.4.2 */
+  /* 302 */ _MHD_S_STR_W_LEN ("Found"),          /* 
RFC-ietf-httpbis-semantics, Section 15.4.3 */
+  /* 303 */ _MHD_S_STR_W_LEN ("See Other"),      /* 
RFC-ietf-httpbis-semantics, Section 15.4.4 */
+  /* 304 */ _MHD_S_STR_W_LEN ("Not Modified"),   /* 
RFC-ietf-httpbis-semantics, Section 15.4.5 */
+  /* 305 */ _MHD_S_STR_W_LEN ("Use Proxy"),      /* 
RFC-ietf-httpbis-semantics, Section 15.4.6 */
+  /* 306 */ _MHD_S_STR_W_LEN ("Switch Proxy"),   /* Not used! 
RFC-ietf-httpbis-semantics, Section 15.4.7 */
+  /* 307 */ _MHD_S_STR_W_LEN ("Temporary Redirect"), /* 
RFC-ietf-httpbis-semantics, Section 15.4.8 */
+  /* 308 */ _MHD_S_STR_W_LEN ("Permanent Redirect") /* 
RFC-ietf-httpbis-semantics, Section 15.4.9 */
 };
 
 static const struct _MHD_str_w_len four_hundred[] = {
-  /* 400 */ _MHD_S_STR_W_LEN ("Bad Request"),    /* RFC7231, Section 6.5.1 */
-  /* 401 */ _MHD_S_STR_W_LEN ("Unauthorized"),   /* RFC7235, Section 3.1 */
-  /* 402 */ _MHD_S_STR_W_LEN ("Payment Required"), /* RFC7231, Section 6.5.2 */
-  /* 403 */ _MHD_S_STR_W_LEN ("Forbidden"),      /* RFC7231, Section 6.5.3 */
-  /* 404 */ _MHD_S_STR_W_LEN ("Not Found"),      /* RFC7231, Section 6.5.4 */
-  /* 405 */ _MHD_S_STR_W_LEN ("Method Not Allowed"), /* RFC7231, Section 6.5.5 
*/
-  /* 406 */ _MHD_S_STR_W_LEN ("Not Acceptable"), /* RFC7231, Section 6.5.6 */
-  /* 407 */ _MHD_S_STR_W_LEN ("Proxy Authentication Required"), /* RFC7235, 
Section 3.2 */
-  /* 408 */ _MHD_S_STR_W_LEN ("Request Timeout"), /* RFC7231, Section 6.5.7 */
-  /* 409 */ _MHD_S_STR_W_LEN ("Conflict"),       /* RFC7231, Section 6.5.8 */
-  /* 410 */ _MHD_S_STR_W_LEN ("Gone"),           /* RFC7231, Section 6.5.9 */
-  /* 411 */ _MHD_S_STR_W_LEN ("Length Required"), /* RFC7231, Section 6.5.10 */
-  /* 412 */ _MHD_S_STR_W_LEN ("Precondition Failed"), /* RFC7232, Section 4.2; 
RFC8144, Section 3.2 */
-  /* 413 */ _MHD_S_STR_W_LEN ("Payload Too Large"), /* RFC7231, Section 6.5.11 
*/
-  /* 414 */ _MHD_S_STR_W_LEN ("URI Too Long"),   /* RFC7231, Section 6.5.12 */
-  /* 415 */ _MHD_S_STR_W_LEN ("Unsupported Media Type"), /* RFC7231, Section 
6.5.13; RFC7694, Section 3 */
-  /* 416 */ _MHD_S_STR_W_LEN ("Range Not Satisfiable"), /* RFC7233, Section 
4.4 */
-  /* 417 */ _MHD_S_STR_W_LEN ("Expectation Failed"), /* RFC7231, Section 
6.5.14 */
+  /* 400 */ _MHD_S_STR_W_LEN ("Bad Request"),    /* 
RFC-ietf-httpbis-semantics, Section 15.5.1 */
+  /* 401 */ _MHD_S_STR_W_LEN ("Unauthorized"),   /* 
RFC-ietf-httpbis-semantics, Section 15.5.2 */
+  /* 402 */ _MHD_S_STR_W_LEN ("Payment Required"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.3 */
+  /* 403 */ _MHD_S_STR_W_LEN ("Forbidden"),      /* 
RFC-ietf-httpbis-semantics, Section 15.5.4 */
+  /* 404 */ _MHD_S_STR_W_LEN ("Not Found"),      /* 
RFC-ietf-httpbis-semantics, Section 15.5.5 */
+  /* 405 */ _MHD_S_STR_W_LEN ("Method Not Allowed"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.6 */
+  /* 406 */ _MHD_S_STR_W_LEN ("Not Acceptable"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.7 */
+  /* 407 */ _MHD_S_STR_W_LEN ("Proxy Authentication Required"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.8 */
+  /* 408 */ _MHD_S_STR_W_LEN ("Request Timeout"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.9 */
+  /* 409 */ _MHD_S_STR_W_LEN ("Conflict"),       /* 
RFC-ietf-httpbis-semantics, Section 15.5.10 */
+  /* 410 */ _MHD_S_STR_W_LEN ("Gone"),           /* 
RFC-ietf-httpbis-semantics, Section 15.5.11 */
+  /* 411 */ _MHD_S_STR_W_LEN ("Length Required"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.12 */
+  /* 412 */ _MHD_S_STR_W_LEN ("Precondition Failed"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.13 */
+  /* 413 */ _MHD_S_STR_W_LEN ("Content Too Large"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.14 */
+  /* 414 */ _MHD_S_STR_W_LEN ("URI Too Long"),   /* 
RFC-ietf-httpbis-semantics, Section 15.5.15 */
+  /* 415 */ _MHD_S_STR_W_LEN ("Unsupported Media Type"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.16 */
+  /* 416 */ _MHD_S_STR_W_LEN ("Range Not Satisfiable"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.17 */
+  /* 417 */ _MHD_S_STR_W_LEN ("Expectation Failed"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.18 */
   /* 418 */ {"Unknown", 0},                      /* Not used */
   /* 419 */ {"Unknown", 0},                      /* Not used */
   /* 420 */ {"Unknown", 0},                      /* Not used */
-  /* 421 */ _MHD_S_STR_W_LEN ("Misdirected Request"), /* RFC7540, Section 
9.1.2 */
-  /* 422 */ _MHD_S_STR_W_LEN ("Unprocessable Entity"), /* RFC4918 */
+  /* 421 */ _MHD_S_STR_W_LEN ("Misdirected Request"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.20 */
+  /* 422 */ _MHD_S_STR_W_LEN ("Unprocessable Content"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.21 */
   /* 423 */ _MHD_S_STR_W_LEN ("Locked"),         /* RFC4918 */
   /* 424 */ _MHD_S_STR_W_LEN ("Failed Dependency"), /* RFC4918 */
   /* 425 */ _MHD_S_STR_W_LEN ("Too Early"),      /* RFC8470 */
-  /* 426 */ _MHD_S_STR_W_LEN ("Upgrade Required"), /* RFC7231, Section 6.5.15 
*/
+  /* 426 */ _MHD_S_STR_W_LEN ("Upgrade Required"), /* 
RFC-ietf-httpbis-semantics, Section 15.5.22 */
   /* 427 */ {"Unknown", 0},                      /* Not used */
   /* 428 */ _MHD_S_STR_W_LEN ("Precondition Required"), /* RFC6585 */
   /* 429 */ _MHD_S_STR_W_LEN ("Too Many Requests"), /* RFC6585 */
@@ -141,12 +141,12 @@ static const struct _MHD_str_w_len four_hundred[] = {
 };
 
 static const struct _MHD_str_w_len five_hundred[] = {
-  /* 500 */ _MHD_S_STR_W_LEN ("Internal Server Error"), /* RFC7231, Section 
6.6.1 */
-  /* 501 */ _MHD_S_STR_W_LEN ("Not Implemented"), /* RFC7231, Section 6.6.2 */
-  /* 502 */ _MHD_S_STR_W_LEN ("Bad Gateway"),    /* RFC7231, Section 6.6.3 */
-  /* 503 */ _MHD_S_STR_W_LEN ("Service Unavailable"), /* RFC7231, Section 
6.6.4 */
-  /* 504 */ _MHD_S_STR_W_LEN ("Gateway Timeout"), /* RFC7231, Section 6.6.5 */
-  /* 505 */ _MHD_S_STR_W_LEN ("HTTP Version Not Supported"), /* RFC7231, 
Section 6.6.6 */
+  /* 500 */ _MHD_S_STR_W_LEN ("Internal Server Error"), /* 
RFC-ietf-httpbis-semantics, Section 15.6.1 */
+  /* 501 */ _MHD_S_STR_W_LEN ("Not Implemented"), /* 
RFC-ietf-httpbis-semantics, Section 15.6.2 */
+  /* 502 */ _MHD_S_STR_W_LEN ("Bad Gateway"),    /* 
RFC-ietf-httpbis-semantics, Section 15.6.3 */
+  /* 503 */ _MHD_S_STR_W_LEN ("Service Unavailable"), /* 
RFC-ietf-httpbis-semantics, Section 15.6.4 */
+  /* 504 */ _MHD_S_STR_W_LEN ("Gateway Timeout"), /* 
RFC-ietf-httpbis-semantics, Section 15.6.5 */
+  /* 505 */ _MHD_S_STR_W_LEN ("HTTP Version Not Supported"), /* 
RFC-ietf-httpbis-semantics, Section 15.6.6 */
   /* 506 */ _MHD_S_STR_W_LEN ("Variant Also Negotiates"), /* RFC2295 */
   /* 507 */ _MHD_S_STR_W_LEN ("Insufficient Storage"), /* RFC4918 */
   /* 508 */ _MHD_S_STR_W_LEN ("Loop Detected"),  /* RFC5842 */
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 7df2a0c6..ca3639f4 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -460,10 +460,12 @@ del_response_header_connection (struct MHD_Response 
*response,
  *   encoding, however for HTTP/1.0 clients chunked encoding will not be used
  *   and manually set "Transfer-Encoding" header is automatically removed
  *   for HTTP/1.0 clients
- * + "Connection" is added automatically with value "Keep-Alive" or "Close".
- *   The header "Connection" with value "Close" could be set by this function
- *   to enforce closure of the connection after sending this response.
- *   "Keep-Alive" cannot be enforced and will be removed automatically.
+ * + "Connection" may be added automatically with value "Keep-Alive" (only
+ *   for HTTP/1.0 clients) or "Close". The header "Connection" with value
+ *   "Close" could be set by this function to enforce closure of
+ *   the connection after sending this response. "Keep-Alive" cannot be
+ *   enforced and will be removed automatically.
+ *   @see #MHD_RF_SEND_KEEP_ALIVE_HEADER
  *
  * Some headers are pre-processed by this function:
  * * "Connection" headers are combined into single header entry, value is

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