X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fsac-a-push.phh;h=746f7ecdb54ca67dc49f1212a4a913f5b6d399db;hb=123416d979e44c2cf3403fffc23fe99c8d6d80d5;hp=bdb4b593c82b50241498a94b572fb9705a02342b;hpb=27185d840648e6857ab197900e3cb11baf5a3692;p=brisk.git diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index bdb4b59..746f7ec 100644 --- a/web/Obj/sac-a-push.phh +++ b/web/Obj/sac-a-push.phh @@ -24,6 +24,7 @@ */ define('SITE_PREFIX', '/brisk/'); +define('SITE_PREFIX_LEN', 7); function spu_process_info($stream_info, $method, &$header, &$get, &$post, &$cookie) { @@ -326,7 +327,16 @@ class Sac_a_push { $addr = stream_socket_get_name($new_socket, TRUE); $header_out = array(); - $this->app->request_mgr($this, $header_out, $new_socket, $path, $addr, $get, $post, $cookie); + $subs = SITE_PREFIX."briskin5/"; + $subs_l = strlen($subs); + $rret = FALSE; + if (!strncmp($path, SITE_PREFIX, SITE_PREFIX_LEN)) { + $rret = $this->app->request_mgr($this, $header_out, $new_socket, substr($path, SITE_PREFIX_LEN), $addr, $get, $post, $cookie); + } + if ($rret == FALSE) { + // FIXME: manage 404 !!! + printf("TODO: fix unknown page\n"); + } printf("number of sockets after %d\n", count($this->socks)); } else { @@ -380,6 +390,9 @@ class Sac_a_push { } + $this->app->garbage_manager(FALSE); + + /* manage unfinished pages */ foreach ($this->pages_flush as $k => $pgflush) { if ($pgflush->try_flush($this->curtime) == TRUE) {