gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 02/02: Updated code to use new HTTP status


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 02/02: Updated code to use new HTTP status codes
Date: Fri, 24 Feb 2017 20:34:34 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 228df068e3df8935655e3329bc8acc8614531c58
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Fri Feb 24 22:27:59 2017 +0300

    Updated code to use new HTTP status codes
---
 src/microhttpd/connection.c     | 16 ++++++++--------
 src/testcurl/test_long_header.c |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 3ce34f65..f192a1bb 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1386,8 +1386,8 @@ MHD_connection_update_event_loop_info (struct 
MHD_Connection *connection)
             {
               transmit_error_response (connection,
                                        (connection->url != NULL)
-                                       ? MHD_HTTP_REQUEST_ENTITY_TOO_LARGE
-                                       : MHD_HTTP_REQUEST_URI_TOO_LONG,
+                                       ? 
MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE
+                                       : MHD_HTTP_URI_TOO_LONG,
                                        REQUEST_TOO_BIG);
               continue;
             }
@@ -1529,8 +1529,8 @@ get_next_header_line (struct MHD_Connection *connection,
        {
          transmit_error_response (connection,
                                   (NULL != connection->url)
-                                  ? MHD_HTTP_REQUEST_ENTITY_TOO_LARGE
-                                  : MHD_HTTP_REQUEST_URI_TOO_LONG,
+                                  ? MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE
+                                  : MHD_HTTP_URI_TOO_LONG,
                                   REQUEST_TOO_BIG);
        }
       if (line_len)
@@ -1580,7 +1580,7 @@ connection_add_header (struct MHD_Connection *connection,
                 _("Not enough memory in pool to allocate header record!\n"));
 #endif
       transmit_error_response (connection,
-                              MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+                               MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE,
                                REQUEST_TOO_BIG);
       return MHD_NO;
     }
@@ -1622,7 +1622,7 @@ parse_cookie_header (struct MHD_Connection *connection)
                 _("Not enough memory in pool to parse cookies!\n"));
 #endif
       transmit_error_response (connection,
-                               MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+                               MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE,
                                REQUEST_TOO_BIG);
       return MHD_NO;
     }
@@ -2244,7 +2244,7 @@ process_broken_line (struct MHD_Connection *connection,
       if (NULL == last)
         {
           transmit_error_response (connection,
-                                   MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+                                   MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE,
                                    REQUEST_TOO_BIG);
           return MHD_NO;
         }
@@ -2260,7 +2260,7 @@ process_broken_line (struct MHD_Connection *connection,
                                        kind)))
     {
       transmit_error_response (connection,
-                               MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+                               MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE,
                                REQUEST_TOO_BIG);
       return MHD_NO;
     }
diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c
index b2ca1f94..a82464b8 100644
--- a/src/testcurl/test_long_header.c
+++ b/src/testcurl/test_long_header.c
@@ -152,7 +152,7 @@ testLongUrlGet ()
   curl_easy_cleanup (c);
   MHD_stop_daemon (d);
   free (url);
-  if (code != MHD_HTTP_REQUEST_URI_TOO_LONG)
+  if (code != MHD_HTTP_URI_TOO_LONG)
     return 8;
   return 0;
 }
@@ -230,7 +230,7 @@ testLongHeaderGet ()
   curl_easy_cleanup (c);
   MHD_stop_daemon (d);
   free (url);
-  if (code != MHD_HTTP_REQUEST_ENTITY_TOO_LARGE)
+  if (code != MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE)
     return 128;
   return 0;
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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