Lines Matching refs:conn

33 	struct connection *conn; /*structure holding all the details of the current request*/  member
49 bytes = webjames_writebuffer(WG(conn),str,str_length); in sapi_webjames_ub_write()
69 if (WG(conn)->flags.outputheaders) { in sapi_webjames_send_header()
72 bytes = webjames_writebuffer(WG(conn), header, len); in sapi_webjames_send_header()
83 webjames_writestring(WG(conn), "\r\n"); in sapi_webjames_send_header()
90 if (WG(conn)->body==NULL) return 0; in sapi_webjames_read_post()
91 if (count_bytes+WG(bodyread)>WG(conn)->bodysize) count_bytes=WG(conn)->bodysize-WG(bodyread); in sapi_webjames_read_post()
92 memcpy(buffer, WG(conn)->body+WG(bodyread), count_bytes); in sapi_webjames_read_post()
99 return WG(conn)->cookie; in sapi_webjames_read_cookies()
107 snprintf(buf, BUF_SIZE, "%d", WG(conn)->field);\
112 if (WG(conn)->field) { \
113 php_register_variable(name, WG(conn)->field, track_vars_array TSRMLS_CC); \
130 docroot = __unixify(WG(conn)->homedir,0,NULL,1024,0); in sapi_webjames_register_variables()
141 …snprintf(buf, BUF_SIZE, "%d.%d.%d.%d", WG(conn)->ipaddr[0], WG(conn)->ipaddr[1], WG(conn)->ipaddr[… in sapi_webjames_register_variables()
143 if (WG(conn)->dnsstatus == DNS_OK) ADD_FIELD("REMOTE_HOST", host); in sapi_webjames_register_variables()
145 if ((WG(conn)->method == METHOD_POST) || (WG(conn)->method == METHOD_PUT)) { in sapi_webjames_register_variables()
150 …if ((WG(conn)->method == METHOD_PUT) || (WG(conn)->method == METHOD_DELETE)) ADD_FIELD("ENTITY_PAT… in sapi_webjames_register_variables()
152 if (WG(conn)->pwd) { in sapi_webjames_register_variables()
174 path = __unixify(WG(conn)->filename,0,NULL,1024,0); in webjames_module_main()
177 SG(request_info).query_string = WG(conn)->args; in webjames_module_main()
178 SG(request_info).request_uri = WG(conn)->requesturi; in webjames_module_main()
179 SG(request_info).request_method = WG(conn)->methodstr; in webjames_module_main()
180 if (WG(conn)->method==METHOD_HEAD) { in webjames_module_main()
186 SG(request_info).content_type = WG(conn)->type; in webjames_module_main()
187 SG(request_info).content_length = WG(conn)->bodysize; in webjames_module_main()
191 if (WG(conn)->authorization) { in webjames_module_main()
192 char *colon=strchr(WG(conn)->authorization,':'); in webjames_module_main()
194 SG(request_info).auth_user = emalloc(colon-WG(conn)->authorization+1); in webjames_module_main()
196 memcpy(SG(request_info).auth_user,WG(conn)->authorization,colon-WG(conn)->authorization); in webjames_module_main()
197 SG(request_info).auth_user[colon-WG(conn)->authorization]='\0'; in webjames_module_main()
219 static void webjames_php_close(struct connection *conn, int force) in webjames_php_close() argument
225 WG(oldclose)(conn,force); in webjames_php_close()
228 void webjames_php_request(struct connection *conn) in webjames_php_request() argument
233 WG(conn) = conn; in webjames_php_request()
235 WG(oldclose) = conn->close; in webjames_php_request()
236 conn->close=webjames_php_close; in webjames_php_request()
240 WG(oldclose)(WG(conn), 0); in webjames_php_request()