最終更新: library_task 2010年11月27日(土) 11:19:24履歴
HTTPリクエスト処理する際の主要な情報が入るngx_http_request_t構造体の中身です。
./src/http/ngx_http_request.hで定義されています。
【メモ】
unsigned http_minor:16;の16は初期値ではない点に注意。bit数を表す。
./src/http/ngx_http_request.hで定義されています。
struct ngx_http_request_s { uint32_t signature; /* "HTTP" */ ngx_connection_t *connection; void **ctx; void **main_conf; void **srv_conf; void **loc_conf; ngx_http_event_handler_pt read_event_handler; ngx_http_event_handler_pt write_event_handler; #if (NGX_HTTP_CACHE) ngx_http_cache_t *cache; #endif ngx_http_upstream_t *upstream; ngx_array_t *upstream_states; /* of ngx_http_upstream_state_t */ ngx_pool_t *pool; ngx_buf_t *header_in; ngx_http_headers_in_t headers_in; ngx_http_headers_out_t headers_out; ngx_http_request_body_t *request_body; time_t lingering_time; time_t start_sec; ngx_msec_t start_msec; ngx_uint_t method; ngx_uint_t http_version; ngx_str_t request_line; ngx_str_t uri; ngx_str_t args; ngx_str_t exten; ngx_str_t unparsed_uri; ngx_str_t method_name; ngx_str_t http_protocol; ngx_chain_t *out; ngx_http_request_t *main; ngx_http_request_t *parent; ngx_http_postponed_request_t *postponed; ngx_http_post_subrequest_t *post_subrequest; ngx_http_posted_request_t *posted_requests; ngx_http_virtual_names_t *virtual_names; ngx_int_t phase_handler; ngx_http_handler_pt content_handler; ngx_uint_t access_code; ngx_http_variable_value_t *variables; #if (NGX_PCRE) ngx_uint_t ncaptures; int *captures; u_char *captures_data; #endif size_t limit_rate; /* used to learn the Apache compatible response length without a header */ size_t header_size; off_t request_length; ngx_uint_t err_status; ngx_http_connection_t *http_connection; ngx_http_log_handler_pt log_handler; ngx_http_cleanup_t *cleanup; unsigned http_state:4; /* URI with "/." and on Win32 with "//" */ unsigned complex_uri:1; /* URI with "%" */ unsigned quoted_uri:1; /* URI with "+" */ unsigned plus_in_uri:1; /* URI with "\0" or "%00" */ unsigned zero_in_uri:1; unsigned invalid_header:1; unsigned valid_location:1; unsigned valid_unparsed_uri:1; unsigned uri_changed:1; unsigned uri_changes:4; unsigned request_body_in_single_buf:1; unsigned request_body_in_file_only:1; unsigned request_body_in_persistent_file:1; unsigned request_body_in_clean_file:1; unsigned request_body_file_group_access:1; unsigned request_body_file_log_level:3; unsigned subrequest_in_memory:1; unsigned waited:1; #if (NGX_HTTP_CACHE) unsigned cached:1; #endif #if (NGX_HTTP_GZIP) unsigned gzip_tested:1; unsigned gzip_ok:1; unsigned gzip_vary:1; #endif unsigned proxy:1; unsigned bypass_cache:1; unsigned no_cache:1; /* * instead of using the request context data in * ngx_http_limit_zone_module and ngx_http_limit_req_module * we use the single bits in the request structure */ unsigned limit_zone_set:1; unsigned limit_req_set:1; #if 0 unsigned cacheable:1; #endif unsigned pipeline:1; unsigned plain_http:1; unsigned chunked:1; unsigned header_only:1; unsigned zero_body:1; unsigned keepalive:1; unsigned lingering_close:1; unsigned discard_body:1; unsigned internal:1; unsigned error_page:1; unsigned ignore_content_encoding:1; unsigned filter_finalize:1; unsigned post_action:1; unsigned request_complete:1; unsigned request_output:1; unsigned header_sent:1; unsigned expect_tested:1; unsigned root_tested:1; unsigned done:1; unsigned logged:1; unsigned buffered:4; unsigned main_filter_need_in_memory:1; unsigned filter_need_in_memory:1; unsigned filter_need_temporary:1; unsigned allow_ranges:1; #if (NGX_STAT_STUB) unsigned stat_reading:1; unsigned stat_writing:1; #endif unsigned subrequests:8; /* used to parse HTTP headers */ ngx_uint_t state; u_char *uri_start; u_char *uri_end; u_char *uri_ext; u_char *args_start; u_char *request_start; u_char *request_end; u_char *method_end; u_char *schema_start; u_char *schema_end; u_char *host_start; u_char *host_end; u_char *port_start; u_char *port_end; u_char *header_name_start; u_char *header_name_end; u_char *header_start; u_char *header_end; unsigned http_minor:16; unsigned http_major:16; ngx_uint_t header_hash; ngx_uint_t lowcase_index; u_char lowcase_header[NGX_HTTP_LC_HEADER_LEN]; };
項目 | データ内容 | 値の例 |
uint32_t signature; | ||
ngx_connection_t *connection; | ||
void **ctx; | ||
void **main_conf; | ||
void **srv_conf; | ||
void **loc_conf; | ||
ngx_http_event_handler_pt read_event_handler; | ||
ngx_http_event_handler_pt write_event_handler; | ||
ngx_http_cache_t *cache; | ||
ngx_http_upstream_t *upstream; | ||
ngx_array_t *upstream_states; | ||
ngx_pool_t *pool; | ||
ngx_buf_t *header_in; | ||
ngx_http_headers_in_t headers_in; | ||
ngx_http_headers_out_t headers_out; | ||
ngx_http_request_body_t *request_body; | ||
time_t lingering_time; | ||
time_t start_sec; | ||
ngx_msec_t start_msec; | ||
ngx_uint_t method; | ||
ngx_uint_t http_version; | ||
ngx_str_t request_line; | ||
ngx_str_t uri; | ||
ngx_str_t args; | ||
ngx_str_t exten; | ||
ngx_str_t unparsed_uri; | ||
ngx_str_t method_name; | ||
ngx_str_t http_protocol; | ||
ngx_chain_t *out; | ||
ngx_http_request_t *main; | ||
ngx_http_request_t *parent; | ||
ngx_http_postponed_request_t *postponed; | ||
ngx_http_post_subrequest_t *post_subrequest; | ||
ngx_http_posted_request_t *posted_requests; | ||
ngx_http_virtual_names_t *virtual_names; | ||
ngx_int_t phase_handler; | ||
ngx_http_handler_pt content_handler; | ||
ngx_uint_t access_code; | ||
ngx_http_variable_value_t *variables; | ||
ngx_uint_t ncaptures; | ||
int *captures; | ||
u_char *captures_data; | ||
size_t limit_rate; | ||
size_t header_size; | ||
off_t request_length; | ||
ngx_uint_t err_status; | ||
ngx_http_connection_t *http_connection; | ||
ngx_http_log_handler_pt log_handler; | ||
ngx_http_cleanup_t *cleanup; | ||
unsigned http_state:4; | ||
unsigned complex_uri:1; | ||
unsigned quoted_uri:1; | ||
unsigned plus_in_uri:1; | ||
unsigned zero_in_uri:1; | ||
unsigned invalid_header:1; | ||
unsigned valid_location:1; | ||
unsigned valid_unparsed_uri:1; | ||
unsigned uri_changed:1; | ||
unsigned uri_changes:4; | ||
unsigned request_body_in_single_buf:1; | ||
unsigned request_body_in_file_only:1; | ||
unsigned request_body_in_persistent_file:1; | ||
unsigned request_body_in_clean_file:1; | ||
unsigned request_body_file_group_access:1; | ||
unsigned request_body_file_log_level:3; | ||
unsigned subrequest_in_memory:1; | ||
unsigned waited:1; | ||
unsigned cached:1; | ||
unsigned gzip_tested:1; | ||
unsigned gzip_ok:1; | ||
unsigned gzip_vary:1; | ||
unsigned proxy:1; | ||
unsigned bypass_cache:1; | ||
unsigned no_cache:1; | ||
unsigned limit_zone_set:1; | ||
unsigned limit_req_set:1; | ||
unsigned cacheable:1; | ||
unsigned pipeline:1; | ||
unsigned plain_http:1; | ||
unsigned chunked:1; | ||
unsigned header_only:1; | ||
unsigned zero_body:1; | ||
unsigned keepalive:1; | ||
unsigned lingering_close:1; | ||
unsigned discard_body:1; | ||
unsigned internal:1; | 内部リクエスト,1が入る。subrequestや内部リダイレクトの場合。confのinternalと一緒なのか要確認 | 1 |
unsigned error_page:1; | ||
unsigned ignore_content_encoding:1; | ||
unsigned filter_finalize:1; | ||
unsigned post_action:1; | ||
unsigned request_complete:1; | ||
unsigned request_output:1; | ||
unsigned header_sent:1; | ||
unsigned expect_tested:1; | ||
unsigned root_tested:1; | ||
unsigned done:1; | ||
unsigned logged:1; | ||
unsigned buffered:4; | ||
unsigned main_filter_need_in_memory:1; | ||
unsigned filter_need_in_memory:1; | ||
unsigned filter_need_temporary:1; | ||
unsigned allow_ranges:1; | ||
unsigned stat_reading:1; | ||
unsigned stat_writing:1; | ||
unsigned subrequests:8; | ||
ngx_uint_t state; | ||
u_char *uri_start; | ||
u_char *uri_end; | ||
u_char *uri_ext; | ||
u_char *args_start; | ||
u_char *request_start; | ||
u_char *request_end; | ||
u_char *method_end; | ||
u_char *schema_start; | ||
u_char *schema_end; | ||
u_char *host_start; | ||
u_char *host_end; | ||
u_char *port_start; | ||
u_char *port_end; | ||
u_char *header_name_start; | ||
u_char *header_name_end; | ||
u_char *header_start; | ||
u_char *header_end; | ||
unsigned http_minor:16; | ||
unsigned http_major:16; | ||
ngx_uint_t header_hash; | ||
ngx_uint_t lowcase_index; | ||
u_char lowcase_header[NGX_HTTP_LC_HEADER_LEN]; |
【メモ】
unsigned http_minor:16;の16は初期値ではない点に注意。bit数を表す。
このページへのコメント
4o6oun <a href="http://ydblcwwftuor.com/">ydblcwwftuor</a>, [url=http://cktzvlaeaezy.com/]cktzvlaeaezy[/url], [link=http://iaxhaldlqffg.com/]iaxhaldlqffg[/link], http://dfaoxesypjyr.com/