diff options
author | Christian Grothoff <christian@grothoff.org> | 2007-06-13 23:03:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2007-06-13 23:03:21 +0000 |
commit | 7020eed03e0c270399c0a9087815cbbc93dda15f (patch) | |
tree | 9cb8edb5cc91644b9215f34a3d2e9bf26fdeca7f | |
parent | 911f8ea3b614fcd61e46e2b0f09a4da9825aaba6 (diff) |
fix
-rw-r--r-- | src/daemon/daemon.c | 2 | ||||
-rw-r--r-- | src/daemon/session.c | 6 |
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, return MHD_NO; ah = ah->next; } - ah = malloc(sizeof(struct MHD_AccessHandler)); + ah = malloc(sizeof(struct MHD_Access_Handler)); ah->next = daemon->handlers; ah->uri_prefix = strdup(uri_prefix); 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) { (rbuf[pos] != '\r') && (rbuf[pos] != '\n') ) pos++; - if (pos == session->readLoc) { + if (pos == session->readLoc - 1) { /* not found, consider growing... */ if (session->readLoc == session->read_buffer_size) { /* grow buffer to read larger header or die... */ @@ -194,8 +194,8 @@ MHD_get_next_header_line(struct MHD_Session * session) { session->read_buffer, pos-1); rbuf[pos-1] = '\0'; - if ( (rbuf[pos] == '\r') && - (rbuf[pos+1] == '\n') ) + if ( (session->read_buffer[pos] == '\r') && + (session->read_buffer[pos+1] == '\n') ) pos++; /* skip both r and n */ pos++; memmove(session->read_buffer, |