- static function garbage_time_is_expired($tm)
- {
- $ret = TRUE;
- $fp = FALSE;
- do {
- if (file_exists(PROXY_PATH) == FALSE)
- mkdir(PROXY_PATH, 0775, TRUE);
- if (($fp = @fopen(PROXY_PATH."/garbage_time.expired", 'rb')) == FALSE)
- break;
- if (($s = fread($fp, 4)) == FALSE)
- break;
- if (mb_strlen($s, "ASCII") != 4)
- break;
- $arr = unpack('Le', $s);
- if ($arr['e'] > $tm)
- $ret = FALSE;
- } while (0);
-
- if ($fp != FALSE)
- fclose($fp);
-
- log_rd2("END: return ".($ret ? "TRUE" : "FALSE"));
-
- return ($ret);
- }
-
- static function garbage_time_expire_set($tm)
- {
- do {
- if (file_exists(PROXY_PATH) == FALSE)
- mkdir(PROXY_PATH, 0775, TRUE);
- if (($fp = @fopen(PROXY_PATH."/garbage_time.expired", 'wb')) == FALSE)
- break;
- fwrite($fp, pack("L",$tm));
- fclose($fp);
-
- return (TRUE);
- } while (0);
-
- return (FALSE);
- }
-
- function request_mgr(&$s_a_p, &$header_out, &$new_socket, $path, $addr, $get, $post, $cookie)
+ function request_mgr(&$s_a_p, $header, &$header_out, &$new_socket, $path, $addr, $get, $post, $cookie)