544 |
internal_error(S, SC_BAD_REQUEST, "No request found"); |
internal_error(S, SC_BAD_REQUEST, "No request found"); |
545 |
return NULL; |
return NULL; |
546 |
} |
} |
547 |
Util_chomp(line,REQ_STRLEN); |
Util_chomp(line); |
|
/* RATS: ignore */ /* Util_chomp does zero termination */ |
|
548 |
if(sscanf(line, "%s %s HTTP/%3[1.0]", method, url, protocol) != 3) { |
if(sscanf(line, "%s %s HTTP/%3[1.0]", method, url, protocol) != 3) { |
549 |
internal_error(S, SC_BAD_REQUEST, "Cannot parse request"); |
internal_error(S, SC_BAD_REQUEST, "Cannot parse request"); |
550 |
return NULL; |
return NULL; |
609 |
*value++= 0; |
*value++= 0; |
610 |
Util_trim(line); |
Util_trim(line); |
611 |
Util_trim(value); |
Util_trim(value); |
612 |
Util_chomp(value, (REQ_STRLEN-(value-line))); |
Util_chomp(value); |
613 |
header->name= xstrdup(line); |
header->name= xstrdup(line); |
614 |
header->value= xstrdup(value); |
header->value= xstrdup(value); |
615 |
header->next= req->headers; |
header->next= req->headers; |