aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/connection.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-08-15 08:59:38 +0000
committerChristian Grothoff <christian@grothoff.org>2007-08-15 08:59:38 +0000
commit2b3429e30ce710904e8af56f1e6098c981359962 (patch)
treeab27fd31f634f5fc4a0dcf52c4c505a08fe359c7 /src/daemon/connection.c
parentd2ea952b603c504aa54aa8bd390d8b4f74f65502 (diff)
downloadlibmicrohttpd-2b3429e30ce710904e8af56f1e6098c981359962.tar.gz
libmicrohttpd-2b3429e30ce710904e8af56f1e6098c981359962.zip
fix
Diffstat (limited to 'src/daemon/connection.c')
-rw-r--r--src/daemon/connection.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
index f65ff577..15a9be42 100644
--- a/src/daemon/connection.c
+++ b/src/daemon/connection.c
@@ -1,8 +1,8 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 (C) 2007 Daniel Pittman and Christian Grothoff 3 (C) 2007 Daniel Pittman and Christian Grothoff
4 4
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public 7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
@@ -218,7 +218,7 @@ MHD_connection_get_fdset (struct MHD_Connection *connection,
218 * We ran out of memory processing the 218 * We ran out of memory processing the
219 * header. Handle it properly by stopping to read data 219 * header. Handle it properly by stopping to read data
220 * and sending a HTTP 413 or HTTP 414 response. 220 * and sending a HTTP 413 or HTTP 414 response.
221 * 221 *
222 * @param status_code the response code to send (413 or 414) 222 * @param status_code the response code to send (413 or 414)
223 */ 223 */
224static void 224static void
@@ -383,7 +383,7 @@ parse_arguments (enum MHD_ValueKind kind,
383 383
384/** 384/**
385 * Parse the cookie header (see RFC 2109). 385 * Parse the cookie header (see RFC 2109).
386 * 386 *
387 * @return MHD_YES for success, MHD_NO for failure (malformed, out of memory) 387 * @return MHD_YES for success, MHD_NO for failure (malformed, out of memory)
388 */ 388 */
389static int 389static int
@@ -597,7 +597,7 @@ MHD_parse_connection_headers (struct MHD_Connection *connection)
597 MHD_HTTP_HEADER_CONNECTION); 597 MHD_HTTP_HEADER_CONNECTION);
598 if ((end != NULL) && (0 == strcasecmp (end, "close"))) 598 if ((end != NULL) && (0 == strcasecmp (end, "close")))
599 { 599 {
600 /* other side explicitly requested 600 /* other side explicitly requested
601 that we close the connection after 601 that we close the connection after
602 this request */ 602 this request */
603 connection->read_close = MHD_YES; 603 connection->read_close = MHD_YES;
@@ -662,7 +662,7 @@ MHD_find_access_handler (struct MHD_Connection *connection)
662 * content encoding of the POST data. And of course, 662 * content encoding of the POST data. And of course,
663 * this requires that the request is actually a 663 * this requires that the request is actually a
664 * POST request. 664 * POST request.
665 * 665 *
666 * @return MHD_YES if so 666 * @return MHD_YES if so
667 */ 667 */
668static int 668static int
@@ -701,12 +701,12 @@ MHD_test_post_data (struct MHD_Connection *connection)
701 * 701 *
702 * Needs to first check POST encoding and then do 702 * Needs to first check POST encoding and then do
703 * the right thing (TM). The POST data is in the 703 * the right thing (TM). The POST data is in the
704 * connection's post_data buffer between the postPos 704 * connection's post_data buffer between the postPos
705 * and postLoc offsets. The POST message maybe 705 * and postLoc offsets. The POST message maybe
706 * incomplete. The existing buffer (allocated from 706 * incomplete. The existing buffer (allocated from
707 * the pool) can be used and modified but must then 707 * the pool) can be used and modified but must then
708 * be properly removed from the struct. 708 * be properly removed from the struct.
709 * 709 *
710 * @return MHD_YES on success, MHD_NO on error (i.e. out of 710 * @return MHD_YES on success, MHD_NO on error (i.e. out of
711 * memory). 711 * memory).
712 */ 712 */
@@ -728,7 +728,7 @@ MHD_parse_post_data (struct MHD_Connection *connection)
728 /* invalidate read buffer for other uses -- 728 /* invalidate read buffer for other uses --
729 in particular, do not give it to the 729 in particular, do not give it to the
730 client; if this were to be needed, we would 730 client; if this were to be needed, we would
731 have to make a copy, which would double memory 731 have to make a copy, which would double memory
732 requirements */ 732 requirements */
733 connection->read_buffer_size = 0; 733 connection->read_buffer_size = 0;
734 connection->readLoc = 0; 734 connection->readLoc = 0;
@@ -932,7 +932,8 @@ get_date_string (char *date, unsigned int max)
932 { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; 932 { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
933 static const char *mons[] = 933 static const char *mons[] =
934 { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", 934 { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
935"Nov", "Dec" }; 935 "Nov", "Dec"
936 };
936 struct tm now; 937 struct tm now;
937 time_t t; 938 time_t t;
938 939