Lines Matching refs:NSG
57 #define NSG(v) TSRMG(ns_globals_id, ns_globals_struct *, v) macro
95 n = Ns_ConnWrite(NSG(conn), (void *) str, str_length); in php_ns_sapi_ub_write()
129 Ns_ConnSetTypeHeader(NSG(conn), header_content); in php_ns_sapi_header_handler()
131 Ns_ConnSetHeaders(NSG(conn), header_name, header_content); in php_ns_sapi_header_handler()
151 Ns_ConnSetRequiredHeaders(NSG(conn), "text/html", 0); in php_ns_sapi_send_headers()
154 Ns_ConnFlushHeaders(NSG(conn), SG(sapi_headers).http_response_code); in php_ns_sapi_send_headers()
170 max_read = MIN(NSG(data_avail), count_bytes); in php_ns_sapi_read_post()
172 total_read = Ns_ConnRead(NSG(conn), buf, max_read); in php_ns_sapi_read_post()
177 NSG(data_avail) -= total_read; in php_ns_sapi_read_post()
193 i = Ns_SetIFind(NSG(conn->headers), "cookie"); in php_ns_sapi_read_cookies()
195 http_cookie = Ns_SetValue(NSG(conn->headers), i); in php_ns_sapi_read_cookies()
229 php_info_print_table_row(2, "HTTP Request", NSG(conn)->request->line); in php_info_aolserver()
230 for (i = 0; i < Ns_SetSize(NSG(conn)->headers); i++) { in php_info_aolserver()
231 php_info_print_table_row(2, Ns_SetKey(NSG(conn)->headers, i), Ns_SetValue(NSG(conn)->headers, i)); in php_info_aolserver()
235 for (i = 0; i < Ns_SetSize(NSG(conn)->outputheaders); i++) { in php_info_aolserver()
236 …php_info_print_table_row(2, Ns_SetKey(NSG(conn)->outputheaders, i), Ns_SetValue(NSG(conn)->outputh… in php_info_aolserver()
272 for (i = 0; i < Ns_SetSize(NSG(conn->headers)); i++) { in PHP_FUNCTION()
273 char *key = Ns_SetKey(NSG(conn->headers), i); in PHP_FUNCTION()
274 char *value = Ns_SetValue(NSG(conn->headers), i); in PHP_FUNCTION()
310 for(i = 0; i < Ns_SetSize(NSG(conn->headers)); i++) { in php_ns_sapi_register_variables()
311 char *key = Ns_SetKey(NSG(conn->headers), i); in php_ns_sapi_register_variables()
312 char *value = Ns_SetValue(NSG(conn->headers), i); in php_ns_sapi_register_variables()
331 snprintf(buf, NS_BUF_SIZE, "HTTP/%1.1f", NSG(conn)->request->version); in php_ns_sapi_register_variables()
334 ADD_STRINGX("REQUEST_METHOD", NSG(conn)->request->method); in php_ns_sapi_register_variables()
336 if(NSG(conn)->request->query) in php_ns_sapi_register_variables()
337 ADD_STRINGX("QUERY_STRING", NSG(conn)->request->query); in php_ns_sapi_register_variables()
341 ADD_STRINGX("REMOTE_ADDR", Ns_ConnPeer(NSG(conn))); in php_ns_sapi_register_variables()
343 snprintf(buf, NS_BUF_SIZE, "%d", Ns_ConnPeerPort(NSG(conn))); in php_ns_sapi_register_variables()
346 snprintf(buf, NS_BUF_SIZE, "%d", Ns_ConnPort(NSG(conn))); in php_ns_sapi_register_variables()
349 tmp = Ns_ConnHost(NSG(conn)); in php_ns_sapi_register_variables()
439 server = Ns_ConnServer(NSG(conn)); in php_ns_request_ctor()
442 SG(request_info).query_string = safe_strdup(NSG(conn->request->query)); in php_ns_request_ctor()
445 Ns_UrlToFile(&ds, server, NSG(conn->request->url)); in php_ns_request_ctor()
452 SG(request_info).request_method = NSG(conn)->request->method; in php_ns_request_ctor()
453 if(NSG(conn)->request->version > 1.0) SG(request_info).proto_num = 1001; in php_ns_request_ctor()
455 SG(request_info).content_length = Ns_ConnContentLength(NSG(conn)); in php_ns_request_ctor()
456 index = Ns_SetIFind(NSG(conn)->headers, "content-type"); in php_ns_request_ctor()
458 Ns_SetValue(NSG(conn)->headers, index); in php_ns_request_ctor()
461 tmp = Ns_ConnAuthUser(NSG(conn)); in php_ns_request_ctor()
466 tmp = Ns_ConnAuthPasswd(NSG(conn)); in php_ns_request_ctor()
471 NSG(data_avail) = SG(request_info).content_length; in php_ns_request_ctor()
499 NSG(conn) = conn; in php_ns_request_handler()