Klaus Demo nginx / 4c5207f
allow full URL without URI part: "GET http://host HTTP/1.0" Igor Sysoev 14 years ago
1 changed file(s) with 22 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
334334 break;
335335 }
336336
337 r->host_end = p;
338
337339 switch (ch) {
338340 case ':':
339 r->host_end = p;
340341 state = sw_port;
341342 break;
342343 case '/':
343 r->host_end = p;
344344 r->uri_start = p;
345345 state = sw_after_slash_in_uri;
346346 break;
347 default:
348 r->host_end = p;
347 case ' ':
348 /*
349 * use single "/" from request line to preserve pointers,
350 * if request line will be copied to large client buffer
351 */
352 r->uri_start = r->schema_end + 1;
353 r->uri_end = r->schema_end + 2;
354 state = sw_http_09;
355 break;
356 default:
349357 return NGX_HTTP_PARSE_INVALID_REQUEST;
350358 }
351359 break;
360368 r->port_end = p;
361369 r->uri_start = p;
362370 state = sw_after_slash_in_uri;
371 break;
372 case ' ':
373 r->port_end = p;
374 /*
375 * use single "/" from request line to preserve pointers,
376 * if request line will be copied to large client buffer
377 */
378 r->uri_start = r->schema_end + 1;
379 r->uri_end = r->schema_end + 2;
380 state = sw_http_09;
363381 break;
364382 default:
365383 return NGX_HTTP_PARSE_INVALID_REQUEST;