|
@@ -189,8 +189,8 @@ char * http_token ( char **line, char **value ) {
|
189
|
189
|
if ( value )
|
190
|
190
|
*value = NULL;
|
191
|
191
|
|
192
|
|
-
|
193
|
|
- while ( isspace ( **line ) )
|
|
192
|
+
|
|
193
|
+ while ( ( isspace ( **line ) ) || ( **line == ',' ) )
|
194
|
194
|
(*line)++;
|
195
|
195
|
|
196
|
196
|
|
|
@@ -201,8 +201,8 @@ char * http_token ( char **line, char **value ) {
|
201
|
201
|
|
202
|
202
|
while ( ( c = **line ) ) {
|
203
|
203
|
|
204
|
|
-
|
205
|
|
- if ( isspace ( c ) && ! quote )
|
|
204
|
+
|
|
205
|
+ if ( ( isspace ( c ) || ( c == ',' ) ) && ! quote )
|
206
|
206
|
break;
|
207
|
207
|
|
208
|
208
|
|
|
@@ -1315,19 +1315,17 @@ http_response_transfer_encoding __http_response_header = {
|
1315
|
1315
|
* @ret rc Return status code
|
1316
|
1316
|
*/
|
1317
|
1317
|
static int http_parse_connection ( struct http_transaction *http, char *line ) {
|
|
1318
|
+ char *token;
|
1318
|
1319
|
|
1319
|
1320
|
|
1320
|
|
- if ( strcasecmp ( line, "keep-alive" ) == 0 ) {
|
1321
|
|
- http->response.flags |= HTTP_RESPONSE_KEEPALIVE;
|
1322
|
|
- return 0;
|
1323
|
|
- }
|
1324
|
|
- if ( strcasecmp ( line, "close" ) == 0 ) {
|
1325
|
|
- http->response.flags &= ~HTTP_RESPONSE_KEEPALIVE;
|
1326
|
|
- return 0;
|
|
1321
|
+ while ( ( token = http_token ( &line, NULL ) ) ) {
|
|
1322
|
+ if ( strcasecmp ( token, "keep-alive" ) == 0 )
|
|
1323
|
+ http->response.flags |= HTTP_RESPONSE_KEEPALIVE;
|
|
1324
|
+ if ( strcasecmp ( token, "close" ) == 0 )
|
|
1325
|
+ http->response.flags &= ~HTTP_RESPONSE_KEEPALIVE;
|
1327
|
1326
|
}
|
1328
|
1327
|
|
1329
|
|
- DBGC ( http, "HTTP %p unrecognised Connection \"%s\"\n", http, line );
|
1330
|
|
- return -ENOTSUP_CONNECTION;
|
|
1328
|
+ return 0;
|
1331
|
1329
|
}
|
1332
|
1330
|
|
1333
|
1331
|
|