mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
fix
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user