Lines Matching refs:request
178 php_cli_server_request request; member
356 if (NULL != (val = zend_hash_str_find_ptr(&client->request.headers, "host", sizeof("host")-1))) { in append_essential_headers()
397 headers = &client->request.headers_original_case; in PHP_FUNCTION()
552 …append_http_status_line(&buffer, client->request.protocol_version, SG(sapi_headers).http_response_… in sapi_cli_server_send_headers()
578 …if (NULL == (val = zend_hash_str_find_ptr(&client->request.headers, "cookie", sizeof("cookie")-1))… in sapi_cli_server_read_cookies()
587 if (client->request.content) { in sapi_cli_server_read_post()
588 size_t content_len = client->request.content_len; in sapi_cli_server_read_post()
590 memmove(buf, client->request.content + client->post_read_offset, nbytes_copied); in sapi_cli_server_read_post()
667 …spprintf(&tmp, 0, "HTTP/%d.%d", client->request.protocol_version / 100, client->request.protocol_v… in sapi_cli_server_register_variables()
679 sapi_cli_server_register_variable(track_vars_array, "REQUEST_URI", client->request.request_uri); in sapi_cli_server_register_variables()
681 sapi_cli_server_register_variable(track_vars_array, "SCRIPT_NAME", client->request.vpath); in sapi_cli_server_register_variables()
687 if (client->request.path_info) { in sapi_cli_server_register_variables()
688 sapi_cli_server_register_variable(track_vars_array, "PATH_INFO", client->request.path_info); in sapi_cli_server_register_variables()
690 if (client->request.path_info_len) { in sapi_cli_server_register_variables()
692 spprintf(&tmp, 0, "%s%s", client->request.vpath, client->request.path_info); in sapi_cli_server_register_variables()
696 sapi_cli_server_register_variable(track_vars_array, "PHP_SELF", client->request.vpath); in sapi_cli_server_register_variables()
698 if (client->request.query_string) { in sapi_cli_server_register_variables()
699 sapi_cli_server_register_variable(track_vars_array, "QUERY_STRING", client->request.query_string); in sapi_cli_server_register_variables()
701 …zend_hash_apply_with_arguments(&client->request.headers, (apply_func_args_t)sapi_cli_server_regist… in sapi_cli_server_register_variables()
1155 …, client->addr_str, status, php_http_method_str(client->request.request_method), client->request.r… in php_cli_server_log_response()
1375 static void php_cli_server_request_translate_vpath(php_cli_server_request *request, const char *doc… in php_cli_server_request_translate_vpath() argument
1379 …char *buf = safe_pemalloc(1, request->vpath_len, 1 + document_root_len + 1 + sizeof("index.html"),… in php_cli_server_request_translate_vpath()
1387 if (request->vpath_len > 0 && request->vpath[0] != '/') { in php_cli_server_request_translate_vpath()
1390 q = request->vpath + request->vpath_len; in php_cli_server_request_translate_vpath()
1391 while (q > request->vpath) { in php_cli_server_request_translate_vpath()
1397 memmove(p, request->vpath, request->vpath_len); in php_cli_server_request_translate_vpath()
1399 q = p + request->vpath_len; in php_cli_server_request_translate_vpath()
1406 p += request->vpath_len; in php_cli_server_request_translate_vpath()
1445 request->path_info_len = prev_path_len; in php_cli_server_request_translate_vpath()
1453 request->path_info = prev_path; in php_cli_server_request_translate_vpath()
1454 pefree(request->vpath, 1); in php_cli_server_request_translate_vpath()
1455 request->vpath = pestrndup(vpath, q - vpath, 1); in php_cli_server_request_translate_vpath()
1456 request->vpath_len = q - vpath; in php_cli_server_request_translate_vpath()
1457 request->path_translated = buf; in php_cli_server_request_translate_vpath()
1458 request->path_translated_len = q - buf; in php_cli_server_request_translate_vpath()
1460 pefree(request->vpath, 1); in php_cli_server_request_translate_vpath()
1461 request->vpath = pestrndup(vpath, q - vpath, 1); in php_cli_server_request_translate_vpath()
1462 request->vpath_len = q - vpath; in php_cli_server_request_translate_vpath()
1463 request->path_translated = buf; in php_cli_server_request_translate_vpath()
1464 request->path_translated_len = q - buf; in php_cli_server_request_translate_vpath()
1469 for (;i<request->vpath_len;i++) { in php_cli_server_request_translate_vpath()
1470 if (request->vpath[i] == '\\') { in php_cli_server_request_translate_vpath()
1471 request->vpath[i] = '/'; in php_cli_server_request_translate_vpath()
1476 request->sb = sb; in php_cli_server_request_translate_vpath()
1572 if (UNEXPECTED(client->request.vpath != NULL)) { in php_cli_server_client_read_request_on_path()
1576 client->request.vpath = vpath; in php_cli_server_client_read_request_on_path()
1577 client->request.vpath_len = vpath_len; in php_cli_server_client_read_request_on_path()
1585 if (EXPECTED(client->request.query_string == NULL)) { in php_cli_server_client_read_request_on_query_string()
1586 client->request.query_string = pestrndup(at, length, 1); in php_cli_server_client_read_request_on_query_string()
1587 client->request.query_string_len = length; in php_cli_server_client_read_request_on_query_string()
1589 …PHP_HTTP_MAX_HEADER_SIZE && PHP_HTTP_MAX_HEADER_SIZE - length >= client->request.query_string_len); in php_cli_server_client_read_request_on_query_string()
1590 …client->request.query_string = perealloc(client->request.query_string, client->request.query_strin… in php_cli_server_client_read_request_on_query_string()
1591 memcpy(client->request.query_string + client->request.query_string_len, at, length); in php_cli_server_client_read_request_on_query_string()
1592 client->request.query_string_len += length; in php_cli_server_client_read_request_on_query_string()
1593 client->request.query_string[client->request.query_string_len] = '\0'; in php_cli_server_client_read_request_on_query_string()
1601 if (EXPECTED(client->request.request_uri == NULL)) { in php_cli_server_client_read_request_on_url()
1602 client->request.request_method = parser->method; in php_cli_server_client_read_request_on_url()
1603 client->request.request_uri = pestrndup(at, length, 1); in php_cli_server_client_read_request_on_url()
1604 client->request.request_uri_len = length; in php_cli_server_client_read_request_on_url()
1606 ZEND_ASSERT(client->request.request_method == parser->method); in php_cli_server_client_read_request_on_url()
1607 …PHP_HTTP_MAX_HEADER_SIZE && PHP_HTTP_MAX_HEADER_SIZE - length >= client->request.query_string_len); in php_cli_server_client_read_request_on_url()
1608 …client->request.request_uri = perealloc(client->request.request_uri, client->request.request_uri_l… in php_cli_server_client_read_request_on_url()
1609 memcpy(client->request.request_uri + client->request.request_uri_len, at, length); in php_cli_server_client_read_request_on_url()
1610 client->request.request_uri_len += length; in php_cli_server_client_read_request_on_url()
1611 client->request.request_uri[client->request.request_uri_len] = '\0'; in php_cli_server_client_read_request_on_url()
1629 zend_hash_add_ptr(&client->request.headers, lc_header_name, client->current_header_value); in php_cli_server_client_save_header()
1630 …zend_hash_add_ptr(&client->request.headers_original_case, orig_header_name, client->current_header… in php_cli_server_client_save_header()
1727 if (!client->request.content) { in php_cli_server_client_read_request_on_body()
1728 client->request.content = pemalloc(parser->content_length, 1); in php_cli_server_client_read_request_on_body()
1729 client->request.content_len = 0; in php_cli_server_client_read_request_on_body()
1731 …client->request.content = perealloc(client->request.content, client->request.content_len + length,… in php_cli_server_client_read_request_on_body()
1732 memmove(client->request.content + client->request.content_len, at, length); in php_cli_server_client_read_request_on_body()
1733 client->request.content_len += length; in php_cli_server_client_read_request_on_body()
1740 client->request.protocol_version = parser->http_major * 100 + parser->http_minor; in php_cli_server_client_read_request_on_message_complete()
1741 …php_cli_server_request_translate_vpath(&client->request, client->server->document_root, client->se… in php_cli_server_client_read_request_on_message_complete()
1743 const char *vpath = client->request.vpath, *end = vpath + client->request.vpath_len, *p = end; in php_cli_server_client_read_request_on_message_complete()
1744 client->request.ext = end; in php_cli_server_client_read_request_on_message_complete()
1745 client->request.ext_len = 0; in php_cli_server_client_read_request_on_message_complete()
1750 client->request.ext = p; in php_cli_server_client_read_request_on_message_complete()
1751 client->request.ext_len = end - p; in php_cli_server_client_read_request_on_message_complete()
1868 request_info->request_method = php_http_method_str(client->request.request_method); in php_cli_server_client_populate_request_info()
1869 request_info->proto_num = client->request.protocol_version; in php_cli_server_client_populate_request_info()
1870 request_info->request_uri = client->request.request_uri; in php_cli_server_client_populate_request_info()
1871 request_info->path_translated = client->request.path_translated; in php_cli_server_client_populate_request_info()
1872 request_info->query_string = client->request.query_string; in php_cli_server_client_populate_request_info()
1873 request_info->content_length = client->request.content_len; in php_cli_server_client_populate_request_info()
1875 …if (NULL != (val = zend_hash_str_find_ptr(&client->request.headers, "content-type", sizeof("conten… in php_cli_server_client_populate_request_info()
1909 if (FAILURE == php_cli_server_request_ctor(&client->request)) { in php_cli_server_client_ctor()
1919 php_cli_server_request_dtor(&client->request); in php_cli_server_client_dtor()
1949 …p_escape_html_entities_ex((const unsigned char *) client->request.request_uri, client->request.req… in php_cli_server_send_error_page()
1997 append_http_status_line(&buffer, client->request.protocol_version, status, 1); in php_cli_server_send_error_page()
2035 if (strlen(client->request.path_translated) != client->request.path_translated_len) { in php_cli_server_dispatch_script()
2056 …if (client->request.path_translated && strlen(client->request.path_translated) != client->request.… in php_cli_server_begin_send_static()
2067 if (client->request.path_translated && in php_cli_server_begin_send_static()
2068 ('.' == client->request.path_translated[client->request.path_translated_len-1] || in php_cli_server_begin_send_static()
2069 ' ' == client->request.path_translated[client->request.path_translated_len-1])) { in php_cli_server_begin_send_static()
2073 …fd = client->request.path_translated ? php_win32_ioutil_open(client->request.path_translated, O_RD… in php_cli_server_begin_send_static()
2075 fd = client->request.path_translated ? open(client->request.path_translated, O_RDONLY): -1; in php_cli_server_begin_send_static()
2088 const char *mime_type = get_mime_type(server, client->request.ext, client->request.ext_len); in php_cli_server_begin_send_static()
2090 append_http_status_line(&buffer, client->request.protocol_version, status, 1); in php_cli_server_begin_send_static()
2106 smart_str_append_unsigned_ex(&buffer, client->request.sb.st_size, 1); in php_cli_server_begin_send_static()
2126 …if (NULL != (auth = zend_hash_str_find_ptr(&client->request.headers, "authorization", sizeof("auth… in php_cli_server_request_startup()
2189 const char *ext = client->request.ext; in php_cli_server_dispatch()
2192 if (client->request.ext_len != 3 in php_cli_server_dispatch()
2194 || !client->request.path_translated) { in php_cli_server_dispatch()
2533 } else if (status == 1 && client->request.request_method == PHP_HTTP_NOT_IMPLEMENTED) { in php_cli_server_recv_event_read_request()