Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_uwsgi_module.c @ 3611:395ae91f7a5a
delete empty Server and Date header used only in proxy mode
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 08 Jun 2010 19:33:53 +0000 |
parents | edcc271f7c4c |
children | 633ef29c9881 |
comparison
equal
deleted
inserted
replaced
3610:edcc271f7c4c | 3611:395ae91f7a5a |
---|---|
1197 /* a whole header has been parsed successfully */ | 1197 /* a whole header has been parsed successfully */ |
1198 | 1198 |
1199 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1199 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1200 "http uwsgi header done"); | 1200 "http uwsgi header done"); |
1201 | 1201 |
1202 /* | |
1203 * if no "Server" and "Date" in header line, | |
1204 * then add the special empty headers | |
1205 */ | |
1206 | |
1207 if (r->upstream->headers_in.server == NULL) { | |
1208 h = ngx_list_push(&r->upstream->headers_in.headers); | |
1209 if (h == NULL) { | |
1210 return NGX_ERROR; | |
1211 } | |
1212 | |
1213 h->hash = ngx_hash(ngx_hash(ngx_hash(ngx_hash( | |
1214 ngx_hash ('s', 'e'), 'r'), 'v'), 'e'), 'r'); | |
1215 | |
1216 ngx_str_set(&h->key, "Server"); | |
1217 ngx_str_null(&h->value); | |
1218 h->lowcase_key = (u_char *) "server"; | |
1219 } | |
1220 | |
1221 if (r->upstream->headers_in.date == NULL) { | |
1222 h = ngx_list_push(&r->upstream->headers_in.headers); | |
1223 if (h == NULL) { | |
1224 return NGX_ERROR; | |
1225 } | |
1226 | |
1227 h->hash = ngx_hash(ngx_hash(ngx_hash('d', 'a'), 't'), 'e'); | |
1228 | |
1229 ngx_str_set(&h->key, "Date"); | |
1230 ngx_str_null(&h->value); | |
1231 h->lowcase_key = (u_char *) "date"; | |
1232 } | |
1233 | |
1234 return NGX_OK; | 1202 return NGX_OK; |
1235 } | 1203 } |
1236 | 1204 |
1237 if (rc == NGX_AGAIN) { | 1205 if (rc == NGX_AGAIN) { |
1238 return NGX_AGAIN; | 1206 return NGX_AGAIN; |