~britco/nginx/master

« back to all changes in this revision

Viewing changes to src/http/ngx_http_core_module.h

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry, Kartik Mistry, Michael Lustfield
  • Date: 2010-11-27 21:04:02 UTC
  • mfrom: (1.3.8 upstream)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: james.westby@ubuntu.com-20101127210402-14sgjpe6r3jup8a9
Tags: 0.8.53-1
[Kartik Mistry]
* debian/control:
  + Added Michael Lustfield as co-maintainer
* nginx.conf:
  + No need to use regex in gzip_disable for msie6, Thanks to António P. P.
    Almeida <appa@perusio.net> (Closes: #592147)
* conf/sites-available/default:
  + Fixed typo for "include fastcgi", Thanks to Mostafa Ghadamyari
    <nginx@gigfa.com> (Closes: #593142, #593143)
* debian/patches/fix_reloading_ipv6.diff:
  + Removed, merged upstream
* debian/init.d:
  + Added fix to control nginx by user in a simple way by setting DAEMON
    variable to an invalid name in /etc/default/nginx. Patch by Toni Mueller
    <support@oeko.net> (Closes: #594598)
* debian/NEWS.Debian:
  + Updated news for 0.8.x as stable branch

[Michael Lustfield]
* New upstream release (Closes: #602970)
  + 0.8.x branch is declared stable by upstream now
* Add a UFW profile set:
  + debian/nginx.ufw.profile: Added.
  + debian/control: nginx: Suggests ufw.
  + debian/dirs: Add 'etc/ufw/applications.d'
  + debian/rules: Add install rule for the nginx UFW profile.
* Moved debian/dirs to debian/nginx.dirs
* Added types_hash_max_size to nginx.conf
* Install simple default index.html file (Closes: #581416)
  + debian/dirs: Add 'usr/share/nginx/www'.
  + debian/nginx.install: Add 'html/* usr/share/nginx/www'.
* debian/patches/nginx-echo.diff:
  + Added Echo module
* Added files for nginx.docs
  - /usr/share/doc/nginx/
    + debian/help/docs/fcgiwrap
    + debian/help/docs/php
    + debian/help/docs/support-irc
    + debian/help/docs/upstream
* Added files for nginx.examples
  - /usr/share/doc/nginx/examples/
    + debian/help/docs/drupal
    + debian/help/docs/http
    + debian/help/docs/mail
    + debian/help/docs/mailman
    + debian/help/docs/nginx.conf
    + debian/help/docs/virtual_hosts
    + debian/help/docs/wordpress
* debian/conf/:
  + Removed excess spaces
  + Added tabs where appropriate
  + Added SCRIPT_FILENAME to fastcgi_params

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#define NGX_HTTP_GZIP_PROXIED_ANY       0x0200
25
25
 
26
26
 
 
27
#define NGX_HTTP_AIO_OFF                0
 
28
#define NGX_HTTP_AIO_ON                 1
 
29
#define NGX_HTTP_AIO_SENDFILE           2
 
30
 
 
31
 
27
32
#define NGX_HTTP_SATISFY_ALL            0
28
33
#define NGX_HTTP_SATISFY_ANY            1
29
34
 
38
43
 
39
44
 
40
45
typedef struct {
 
46
    union {
 
47
        struct sockaddr        sockaddr;
 
48
        struct sockaddr_in     sockaddr_in;
 
49
#if (NGX_HAVE_INET6)
 
50
        struct sockaddr_in6    sockaddr_in6;
 
51
#endif
 
52
#if (NGX_HAVE_UNIX_DOMAIN)
 
53
        struct sockaddr_un     sockaddr_un;
 
54
#endif
 
55
        u_char                 sockaddr_data[NGX_SOCKADDRLEN];
 
56
    } u;
 
57
 
 
58
    socklen_t                  socklen;
 
59
 
 
60
    unsigned                   set:1;
41
61
    unsigned                   default_server:1;
42
62
    unsigned                   bind:1;
43
63
    unsigned                   wildcard:1;
51
71
    int                        backlog;
52
72
    int                        rcvbuf;
53
73
    int                        sndbuf;
 
74
#if (NGX_HAVE_SETFIB)
 
75
    int                        setfib;
 
76
#endif
54
77
 
55
78
#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
56
79
    char                      *accept_filter;
60
83
#endif
61
84
 
62
85
    u_char                     addr[NGX_SOCKADDR_STRLEN + 1];
63
 
} ngx_http_listen_conf_t;
64
 
 
65
 
 
66
 
typedef struct {
67
 
    u_char                     sockaddr[NGX_SOCKADDRLEN];
68
 
    socklen_t                  socklen;
69
 
 
70
 
    u_char                    *file_name;
71
 
    ngx_uint_t                 line;
72
 
 
73
 
    ngx_http_listen_conf_t     conf;
74
 
} ngx_http_listen_t;
 
86
} ngx_http_listen_opt_t;
75
87
 
76
88
 
77
89
typedef enum {
128
140
    ngx_hash_t                 variables_hash;
129
141
 
130
142
    ngx_array_t                variables;       /* ngx_http_variable_t */
 
143
    ngx_uint_t                 ncaptures;
131
144
 
132
145
    ngx_uint_t                 server_names_hash_max_size;
133
146
    ngx_uint_t                 server_names_hash_bucket_size;
137
150
 
138
151
    ngx_hash_keys_arrays_t    *variables_keys;
139
152
 
 
153
    ngx_array_t               *ports;
 
154
 
140
155
    ngx_uint_t                 try_files;       /* unsigned  try_files:1 */
141
156
 
142
157
    ngx_http_phase_t           phases[NGX_HTTP_LOG_PHASE + 1];
144
159
 
145
160
 
146
161
typedef struct {
147
 
    /* array of the ngx_http_listen_t, "listen" directive */
148
 
    ngx_array_t                 listen;
149
 
 
150
162
    /* array of the ngx_http_server_name_t, "server_name" directive */
151
163
    ngx_array_t                 server_names;
152
164
 
167
179
    ngx_flag_t                  merge_slashes;
168
180
    ngx_flag_t                  underscores_in_headers;
169
181
 
 
182
    unsigned                    listen:1;
 
183
#if (NGX_PCRE)
 
184
    unsigned                    captures:1;
 
185
#endif
 
186
 
170
187
    ngx_http_core_loc_conf_t  **named_locations;
171
188
} ngx_http_core_srv_conf_t;
172
189
 
176
193
 
177
194
typedef struct {
178
195
    /* the default server configuration for this address:port */
179
 
    ngx_http_core_srv_conf_t  *core_srv_conf;
 
196
    ngx_http_core_srv_conf_t  *default_server;
180
197
 
181
198
    ngx_http_virtual_names_t  *virtual_names;
182
199
 
217
234
 
218
235
 
219
236
typedef struct {
220
 
    struct sockaddr           *sockaddr;
221
 
    socklen_t                  socklen;
 
237
    ngx_http_listen_opt_t      opt;
222
238
 
223
239
    ngx_hash_t                 hash;
224
240
    ngx_hash_wildcard_t       *wc_head;
225
241
    ngx_hash_wildcard_t       *wc_tail;
226
242
 
227
 
    ngx_array_t                names;      /* array of ngx_http_server_name_t */
228
 
 
229
243
#if (NGX_PCRE)
230
244
    ngx_uint_t                 nregex;
231
245
    ngx_http_server_name_t    *regex;
232
246
#endif
233
247
 
234
248
    /* the default server configuration for this address:port */
235
 
    ngx_http_core_srv_conf_t  *core_srv_conf;
236
 
 
237
 
    unsigned                   default_server:1;
238
 
    unsigned                   bind:1;
239
 
    unsigned                   wildcard:1;
240
 
#if (NGX_HTTP_SSL)
241
 
    unsigned                   ssl:1;
242
 
#endif
243
 
 
244
 
    ngx_http_listen_conf_t    *listen_conf;
 
249
    ngx_http_core_srv_conf_t  *default_server;
 
250
    ngx_array_t                servers;  /* array of ngx_http_core_srv_conf_t */
245
251
} ngx_http_conf_addr_t;
246
252
 
247
253
 
248
254
struct ngx_http_server_name_s {
249
255
#if (NGX_PCRE)
250
 
    ngx_regex_t               *regex;
251
 
    ngx_uint_t                 captures;      /* unsigned  captures:1; */
 
256
    ngx_http_regex_t          *regex;
252
257
#endif
253
 
    ngx_http_core_srv_conf_t  *core_srv_conf; /* virtual name server conf */
 
258
    ngx_http_core_srv_conf_t  *server;   /* virtual name server conf */
254
259
    ngx_str_t                  name;
255
260
};
256
261
 
277
282
    ngx_str_t     name;          /* location name */
278
283
 
279
284
#if (NGX_PCRE)
280
 
    ngx_regex_t  *regex;
281
 
 
282
 
    unsigned      captures:1;
 
285
    ngx_http_regex_t  *regex;
283
286
#endif
284
287
 
285
288
    unsigned      noname:1;   /* "if () {}" block or limit_except */
 
289
    unsigned      lmt_excpt:1;
286
290
    unsigned      named:1;
287
291
 
288
292
    unsigned      exact_match:1;
289
293
    unsigned      noregex:1;
290
294
 
291
295
    unsigned      auto_redirect:1;
292
 
    unsigned      alias:1;
293
296
#if (NGX_HTTP_GZIP)
294
297
    unsigned      gzip_disable_msie6:2;
 
298
#if (NGX_HTTP_DEGRADATION)
 
299
    unsigned      gzip_disable_degradation:2;
 
300
#endif
295
301
#endif
296
302
 
297
303
    ngx_http_location_tree_node_t   *static_locations;
307
313
 
308
314
    ngx_http_handler_pt  handler;
309
315
 
 
316
    /* location name length for inclusive location with inherited alias */
 
317
    size_t        alias;
310
318
    ngx_str_t     root;                    /* root, alias */
311
319
    ngx_str_t     post_action;
312
320
 
319
327
 
320
328
    off_t         client_max_body_size;    /* client_max_body_size */
321
329
    off_t         directio;                /* directio */
 
330
    off_t         directio_alignment;      /* directio_alignment */
322
331
 
323
332
    size_t        client_body_buffer_size; /* client_body_buffer_size */
324
333
    size_t        send_lowat;              /* send_lowat */
326
335
    size_t        limit_rate;              /* limit_rate */
327
336
    size_t        limit_rate_after;        /* limit_rate_after */
328
337
    size_t        sendfile_max_chunk;      /* sendfile_max_chunk */
 
338
    size_t        read_ahead;              /* read_ahead */
329
339
 
330
340
    ngx_msec_t    client_body_timeout;     /* client_body_timeout */
331
341
    ngx_msec_t    send_timeout;            /* send_timeout */
347
357
                                           /* client_body_in_singe_buffer */
348
358
    ngx_flag_t    internal;                /* internal */
349
359
    ngx_flag_t    sendfile;                /* sendfile */
 
360
#if (NGX_HAVE_FILE_AIO)
 
361
    ngx_flag_t    aio;                     /* aio */
 
362
#endif
350
363
    ngx_flag_t    tcp_nopush;              /* tcp_nopush */
351
364
    ngx_flag_t    tcp_nodelay;             /* tcp_nodelay */
352
365
    ngx_flag_t    reset_timedout_connection; /* reset_timedout_connection */
423
436
void ngx_http_core_run_phases(ngx_http_request_t *r);
424
437
ngx_int_t ngx_http_core_generic_phase(ngx_http_request_t *r,
425
438
    ngx_http_phase_handler_t *ph);
 
439
ngx_int_t ngx_http_core_rewrite_phase(ngx_http_request_t *r,
 
440
    ngx_http_phase_handler_t *ph);
426
441
ngx_int_t ngx_http_core_find_config_phase(ngx_http_request_t *r,
427
442
    ngx_http_phase_handler_t *ph);
428
443
ngx_int_t ngx_http_core_post_rewrite_phase(ngx_http_request_t *r,
440
455
void *ngx_http_test_content_type(ngx_http_request_t *r, ngx_hash_t *types_hash);
441
456
ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r);
442
457
void ngx_http_set_exten(ngx_http_request_t *r);
 
458
ngx_int_t ngx_http_send_response(ngx_http_request_t *r, ngx_uint_t status,
 
459
    ngx_str_t *ct, ngx_http_complex_value_t *cv);
443
460
u_char *ngx_http_map_uri_to_path(ngx_http_request_t *r, ngx_str_t *name,
444
461
    size_t *root_length, size_t reserved);
445
462
ngx_int_t ngx_http_auth_basic_user(ngx_http_request_t *r);