This commit is contained in:
Christian Grothoff
2007-06-13 23:03:21 +00:00
parent 911f8ea3b6
commit 7020eed03e
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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,