commit 228df068e3df8935655e3329bc8acc8614531c58
parent 09f0f88e5d4b080e9955d15d05c64271e4ac65ed
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Fri, 24 Feb 2017 22:27:59 +0300
Updated code to use new HTTP status codes
Diffstat:
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git 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
@@ -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;
}