commit 7020eed03e0c270399c0a9087815cbbc93dda15f
parent 911f8ea3b614fcd61e46e2b0f09a4da9825aaba6
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 13 Jun 2007 23:03:21 +0000
fix
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git 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
@@ -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,