aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-06-13 23:03:21 +0000
committerChristian Grothoff <christian@grothoff.org>2007-06-13 23:03:21 +0000
commit7020eed03e0c270399c0a9087815cbbc93dda15f (patch)
tree9cb8edb5cc91644b9215f34a3d2e9bf26fdeca7f
parent911f8ea3b614fcd61e46e2b0f09a4da9825aaba6 (diff)
downloadlibmicrohttpd-7020eed03e0c270399c0a9087815cbbc93dda15f.tar.gz
libmicrohttpd-7020eed03e0c270399c0a9087815cbbc93dda15f.zip
fix
-rw-r--r--src/daemon/daemon.c2
-rw-r--r--src/daemon/session.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index 0abb74b0..24229793 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -58,7 +58,7 @@ MHD_register_handler(struct MHD_Daemon * daemon,
58 return MHD_NO; 58 return MHD_NO;
59 ah = ah->next; 59 ah = ah->next;
60 } 60 }
61 ah = malloc(sizeof(struct MHD_AccessHandler)); 61 ah = malloc(sizeof(struct MHD_Access_Handler));
62 ah->next = daemon->handlers; 62 ah->next = daemon->handlers;
63 ah->uri_prefix = strdup(uri_prefix); 63 ah->uri_prefix = strdup(uri_prefix);
64 ah->dh = dh; 64 ah->dh = dh;
diff --git a/src/daemon/session.c b/src/daemon/session.c
index 7dbc781d..8854b94b 100644
--- a/src/daemon/session.c
+++ b/src/daemon/session.c
@@ -165,7 +165,7 @@ MHD_get_next_header_line(struct MHD_Session * session) {
165 (rbuf[pos] != '\r') && 165 (rbuf[pos] != '\r') &&
166 (rbuf[pos] != '\n') ) 166 (rbuf[pos] != '\n') )
167 pos++; 167 pos++;
168 if (pos == session->readLoc) { 168 if (pos == session->readLoc - 1) {
169 /* not found, consider growing... */ 169 /* not found, consider growing... */
170 if (session->readLoc == session->read_buffer_size) { 170 if (session->readLoc == session->read_buffer_size) {
171 /* grow buffer to read larger header or die... */ 171 /* grow buffer to read larger header or die... */
@@ -194,8 +194,8 @@ MHD_get_next_header_line(struct MHD_Session * session) {
194 session->read_buffer, 194 session->read_buffer,
195 pos-1); 195 pos-1);
196 rbuf[pos-1] = '\0'; 196 rbuf[pos-1] = '\0';
197 if ( (rbuf[pos] == '\r') && 197 if ( (session->read_buffer[pos] == '\r') &&
198 (rbuf[pos+1] == '\n') ) 198 (session->read_buffer[pos+1] == '\n') )
199 pos++; /* skip both r and n */ 199 pos++; /* skip both r and n */
200 pos++; 200 pos++;
201 memmove(session->read_buffer, 201 memmove(session->read_buffer,