define('DBG_LMOP', 0x0800);
define('DBG_TRAC', 0x1000);
define('DBG_SHME', 0x2000);
+define('DBG_ENGI', 0x4000);
// NOTE: BRISK DEBUG must be a numerical constant, not the result of operations on symbols
define('BRISK_DEBUG', 0x0800);
function request_mgr(&$s_a_p, $header, &$header_out, &$new_socket, $path, $addr, $get, $post, $cookie)
{
- printf("NEW_SOCKET (root): %d\n", intval($new_socket));
+ printf("NEW_SOCKET (root): %d PATH [%s]\n", intval($new_socket), $path);
$enc = get_encoding($header);
if (isset($header['User-Agent'])) {
fflush($new_socket);
- $s_a_p->socks_set($new_socket, $user);
+ $s_a_p->socks_set($new_socket, $user, NULL);
$user->rd_socket_set($new_socket);
printf(" - qui ci siamo - ");
return TRUE;
return FALSE;
break;
-
+ case 'test.php':
+ if (!(BRISK_DEBUG & DBG_ENGI))
+ return (FALSE);
+ fprintf(STDERR, "TEST.PHP running\n");
+ if (isset($post['data'])) {
+ $content = $post['data'];
+ }
+ else {
+ $content = "NO DATA AVAILABLE";
+ }
+ $header_out['Content-Type'] = 'text/plain';
+ $s_a_p->pendpage_try_addflush($new_socket, 20, $enc, $header_out, $content);
+ return TRUE;
+ break;
default:
/* FAR TODO: move all into an array of registered sub-apps */
$subs = "briskin5/";