|
@@ -1201,13 +1201,17 @@ static int http_parse_header ( struct http_transaction *http, char *line ) {
|
1201
|
1201
|
DBGC2 ( http, "HTTP %p RX %s\n", http, line );
|
1202
|
1202
|
|
1203
|
1203
|
/* Extract header name */
|
1204
|
|
- sep = strstr ( line, ": " );
|
|
1204
|
+ sep = strchr ( line, ':' );
|
1205
|
1205
|
if ( ! sep ) {
|
1206
|
1206
|
DBGC ( http, "HTTP %p malformed header \"%s\"\n", http, line );
|
1207
|
1207
|
return -EINVAL_HEADER;
|
1208
|
1208
|
}
|
1209
|
1209
|
*sep = '\0';
|
1210
|
|
- line = ( sep + 2 /* ": " */ );
|
|
1210
|
+
|
|
1211
|
+ /* Extract remainder of line */
|
|
1212
|
+ line = ( sep + 1 );
|
|
1213
|
+ while ( isspace ( *line ) )
|
|
1214
|
+ line++;
|
1211
|
1215
|
|
1212
|
1216
|
/* Process header, if recognised */
|
1213
|
1217
|
for_each_table_entry ( header, HTTP_RESPONSE_HEADERS ) {
|