equal
deleted
inserted
replaced
442 break; |
442 break; |
443 |
443 |
444 $client_headers .= $line; |
444 $client_headers .= $line; |
445 $last_line = $line; |
445 $last_line = $line; |
446 } |
446 } |
447 |
|
448 /* |
|
449 $last_line = ''; |
|
450 $client_headers = ''; |
|
451 if ( defined('HTTPD_WS_CHILD') ) |
|
452 { |
|
453 $remote->set_timeout(1); |
|
454 } |
|
455 if ( $line = $remote->read_normal() ) |
|
456 { |
|
457 do |
|
458 { |
|
459 $line = str_replace("\r", "", $line); |
|
460 if ( empty($line) ) |
|
461 continue; |
|
462 $last_line_check = ( HTTPD_SOCKET_LAYER != 'Raw' || ( HTTPD_SOCKET_LAYER == 'Raw' && $last_line == "\n" ) ); |
|
463 if ( $line == "\n" && $last_line_check ) |
|
464 break; |
|
465 $client_headers .= $line; |
|
466 $last_line = $line; |
|
467 $line = $remote->read_normal() |
|
468 } |
|
469 while ( true ); |
|
470 } |
|
471 else |
|
472 { |
|
473 if ( defined('HTTPD_WS_CHILD') ) |
|
474 { |
|
475 if ( $remote->timed_out() ) |
|
476 { |
|
477 status('[debug] keep-alive connection timed out'); |
|
478 continue; // will jump back to the start of the loop and kill the child process |
|
479 } |
|
480 } |
|
481 } |
|
482 */ |
|
483 |
447 |
484 // parse request |
448 // parse request |
485 $client_headers = trim($client_headers); |
449 $client_headers = trim($client_headers); |
486 |
450 |
487 if ( isset($last_finish_time) && empty($client_headers) && defined('HTTPD_WS_CHILD') && $last_finish_time + HTTPD_KEEP_ALIVE_TIMEOUT < microtime(true) ) |
451 if ( isset($last_finish_time) && empty($client_headers) && defined('HTTPD_WS_CHILD') && $last_finish_time + HTTPD_KEEP_ALIVE_TIMEOUT < microtime(true) ) |