~britco/nginx/master

« back to all changes in this revision

Viewing changes to src/http/ngx_http_header_filter_module.c

  • 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:
53
53
 
54
54
    ngx_string("200 OK"),
55
55
    ngx_string("201 Created"),
56
 
    ngx_null_string,  /* "202 Accepted" */
 
56
    ngx_string("202 Accepted"),
57
57
    ngx_null_string,  /* "203 Non-Authoritative Information" */
58
58
    ngx_string("204 No Content"),
59
59
    ngx_null_string,  /* "205 Reset Content" */
68
68
 
69
69
    ngx_string("301 Moved Permanently"),
70
70
    ngx_string("302 Moved Temporarily"),
71
 
    ngx_null_string,  /* "303 See Other" */
 
71
    ngx_string("303 See Other"),
72
72
    ngx_string("304 Not Modified"),
73
73
 
74
74
    /* ngx_null_string, */  /* "305 Use Proxy" */
132
132
ngx_http_header_out_t  ngx_http_headers_out[] = {
133
133
    { ngx_string("Server"), offsetof(ngx_http_headers_out_t, server) },
134
134
    { ngx_string("Date"), offsetof(ngx_http_headers_out_t, date) },
135
 
#if 0
136
 
    { ngx_string("Content-Type"),
137
 
                 offsetof(ngx_http_headers_out_t, content_type) },
138
 
#endif
139
135
    { ngx_string("Content-Length"),
140
136
                 offsetof(ngx_http_headers_out_t, content_length) },
141
137
    { ngx_string("Content-Encoding"),
174
170
#endif
175
171
    u_char                     addr[NGX_SOCKADDR_STRLEN];
176
172
 
 
173
    if (r->header_sent) {
 
174
        return NGX_OK;
 
175
    }
 
176
 
177
177
    r->header_sent = 1;
178
178
 
179
179
    if (r != r->main) {
222
222
 
223
223
            if (status == NGX_HTTP_NO_CONTENT) {
224
224
                r->header_only = 1;
225
 
                r->headers_out.content_type.len = 0;
226
 
                r->headers_out.content_type.data = NULL;
 
225
                ngx_str_null(&r->headers_out.content_type);
227
226
                r->headers_out.last_modified_time = -1;
228
227
                r->headers_out.last_modified = NULL;
229
228
                r->headers_out.content_length = NULL;
342
341
            port = ntohs(sin6->sin6_port);
343
342
            break;
344
343
#endif
 
344
#if (NGX_HAVE_UNIX_DOMAIN)
 
345
        case AF_UNIX:
 
346
            port = 0;
 
347
            break;
 
348
#endif
345
349
        default: /* AF_INET */
346
350
            sin = (struct sockaddr_in *) c->local_sockaddr;
347
351
            port = ntohs(sin->sin_port);
370
374
        }
371
375
 
372
376
    } else {
373
 
        host.len = 0;
374
 
        host.data = NULL;
 
377
        ngx_str_null(&host);
375
378
        port = 0;
376
379
    }
377
380
 
538
541
 
539
542
        r->headers_out.location->value.len = b->last - p;
540
543
        r->headers_out.location->value.data = p;
541
 
        r->headers_out.location->key.len = sizeof("Location") - 1;
542
 
        r->headers_out.location->key.data = (u_char *) "Location";
 
544
        ngx_str_set(&r->headers_out.location->key, "Location");
543
545
 
544
546
        *b->last++ = CR; *b->last++ = LF;
545
547
    }