summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-02-14Mp4: remove useless leading stsc entry in result mp4.Roman Arutyunyan1-1/+1
The fix removes useless stsc entry in result mp4. If start_sample == n then current stsc entry should be skipped and the result stsc should start with the next entry. The reason for that is start_sample starts from 0, not 1.
2014-02-11Upstream: fix $upstream_status variable.Piotr Sikora4-6/+6
Previously, upstream's status code was overwritten with cached response's status code when STALE or REVALIDATED response was sent to the client. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-02-11SSL: the $ssl_session_reused variable.Maxim Dounin1-0/+3
2014-02-04Range filter: fixed duplicate charset.Ruslan Ermilov1-4/+8
If a proxied response had charset in Content-Type, the charset was duplicated in a response to client request with byte ranges.
2014-01-28SSL: support ALPN (IETF's successor to NPN).Piotr Sikora1-2/+70
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-01-29Mp4: fix seeks to standalone last chunk.Roman Arutyunyan1-1/+1
If seek position is within the last track chunk and that chunk is standalone (stsc entry describes only this chunk) such seek generates stsc seek error. The problem is that chunk numbers start with 1, not with 0.
2014-01-29Mp4: skip tracks shorter than seek position (ticket #414).Roman Arutyunyan1-6/+31
Mp4 module does not check movie and track durations when reading file. Instead it generates errors when track metadata is shorter than seek position. Now such tracks are skipped and movie duration check is performed at file read stage.
2014-01-29Mp4: fix seeks after the last key frame.Roman Arutyunyan1-5/+2
Mp4 module does not allow seeks after the last key frame. Since stss atom only contains key frames it's usually shorter than other track atoms. That leads to stss seek error when seek position is close to the end of file. The fix outputs empty stss frame instead of generating error.
2014-01-28SSI: fixed $date_local and $date_gmt without SSI (ticket #230).Maxim Dounin1-5/+8
If there is no SSI context in a given request at a given time, the $date_local and $date_gmt variables used "%s" format, instead of "%A, %d-%b-%Y %H:%M:%S %Z" documented as the default and used if there is SSI module context and timefmt wasn't modified using the "config" SSI command. While use of these variables outside of the SSI evaluation isn't strictly valid, previous behaviour is certainly inconsistent, hence the fix.
2014-01-23Typo fixed.Tatsuhiko Kubo1-1/+1
2014-01-14SSL: fixed ssl_verify_depth to take only one argument.Maxim Dounin1-1/+1
2014-01-10SSL: ssl_session_tickets directive.Dirkjan Bussink2-0/+17
This adds support so it's possible to explicitly disable SSL Session Tickets. In order to have good Forward Secrecy support either the session ticket key has to be reloaded by using nginx' binary upgrade process or using an external key file and reloading the configuration. This directive adds another possibility to have good support by disabling session tickets altogether. If session tickets are enabled and the process lives for a long a time, an attacker can grab the session ticket from the process and use that to decrypt any traffic that occured during the entire lifetime of the process.
2013-12-27Fixed setting of content type in some cases.Ruslan Ermilov3-0/+4
This fixes content type set in stub_status and autoindex responses to be usable in content type checks made by filter modules, such as charset and sub filters.
2013-12-27Style: removed surplus semicolons.Valentin Bartenev3-3/+3
2013-12-23Dav: emit a warning about unsafe URI.Ruslan Ermilov1-1/+1
2013-12-23Teach ngx_http_parse_unsafe_uri() how to unescape URIs.Ruslan Ermilov1-14/+0
This fixes handling of escaped URIs in X-Accel-Redirect (ticket #316), SSI (ticket #240), and DAV.
2013-12-20SSL: ssl_buffer_size directive.Maxim Dounin2-0/+15
2013-12-09Upstream: simplified peer selection loop in the "ip_hash" module.Vladimir Homutov1-18/+28
Conditions for skipping ineligible peers are rewritten to make adding of new conditions simpler and be in line with the "round_robin" and "least_conn" modules. No functional changes.
2013-12-12Trailing whitespace fix.Maxim Dounin1-1/+1
2013-12-11Use ngx_chain_get_free_buf() in pipe input filters.Valentin Bartenev2-57/+15
No functional changes.
2013-12-06Fixed incorrect ngx_str_set() usage, broken in c82b2e020b9f.Piotr Sikora1-1/+1
Found by Coverity Scan CID 1135525. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-12-04Fixed build without SSL, broken by c82b2e020b9f.Maxim Dounin1-3/+3
2013-12-04SSL support in the uwsgi module.Maxim Dounin1-7/+197
Based on patch by Roberto De Ioris.
2013-11-29Upstream: skip empty cache headers.Maxim Dounin3-3/+3
Notably this fixes HTTP_IF_MODIFIED_SINCE which was always sent with cache enabled in fastcgi/scgi/uwsgi after 43ccaf8e8728.
2013-11-18Upstream: cache revalidation with conditional requests.Maxim Dounin4-4/+52
The following new directives are introduced: proxy_cache_revalidate, fastcgi_cache_revalidate, scgi_cache_revalidate, uwsgi_cache_revalidate. Default is off. When set to on, they enable cache revalidation using conditional requests with If-Modified-Since for expired cache items. As of now, no attempts are made to merge headers given in a 304 response during cache revalidation with headers previously stored in a cache item. Headers in a 304 response are only used to calculate new validity time of a cache item.
2013-10-31Gunzip: proper error handling on gunzipping an empty response.Maxim Dounin1-3/+7
With previous code, an empty (malformed) response resulted in a request finalized without sending anything to a client.
2013-10-31Gunzip: "error" logging level on inflate() errors.Maxim Dounin1-1/+1
Errors can easily happen due to broken upstream responses, there is no need to log them at "alert" level.
2013-10-31Auth basic: "info" logging level on no user/password.Maxim Dounin1-1/+1
This isn't an exceptional condition and normally happens on first request from a client.
2013-10-28Gzip, gunzip: flush pending data when incoming chain is NULL.Yichun Zhang2-2/+2
2013-10-18Headers filter: empty Cache-Control is no longer added.Maxim Dounin1-0/+4
Much like with other headers, "add_header Cache-Control $value;" no longer results in anything added to response headers if $value evaluates to an empty string.
2013-10-11SSL: added ability to set keys used for Session Tickets (RFC5077).Piotr Sikora2-0/+19
In order to support key rollover, ssl_session_ticket_key can be defined multiple times. The first key will be used to issue and resume Session Tickets, while the rest will be used only to resume them. ssl_session_ticket_key session_tickets/current.key; ssl_session_ticket_key session_tickets/prev-1h.key; ssl_session_ticket_key session_tickets/prev-2h.key; Please note that nginx supports Session Tickets even without explicit configuration of the keys and this feature should be only used in setups where SSL traffic is distributed across multiple nginx servers. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-10-02Limit req: fixed "nodelay" parsing.Maxim Dounin1-1/+1
Previously arguments starting with "nodelay" were considered valid, e.g. "limit_req ... nodelayFOO;".
2013-10-02Unused macro and variable removed.Sergey Kandaurov1-2/+0
The macro NGX_HTTP_DAV_COPY_BLOCK is not used since 8101d9101ed8 (0.8.9). The variable ngx_accept_mutex_lock_file was never used.
2013-09-27FastCGI: non-buffered mode support.Maxim Dounin1-8/+230
2013-09-27Upstream: subrequest_in_memory support for SCGI and uwsgi enabled.Maxim Dounin2-14/+0
This was missed in 9d59a8eda373 when non-buffered support was added to SCGI and uwsgi.
2013-09-27Upstream: proxy_no_cache, fastcgi_no_cache warnings removed.Maxim Dounin2-12/+0
2013-09-23Proxy: added the "proxy_ssl_ciphers" directive.Piotr Sikora1-0/+22
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-09-22SSL: stop loading configs with invalid "ssl_ciphers" values.Piotr Sikora1-0/+1
While there, remove unnecessary check in ngx_mail_ssl_module. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-09-19Proxy: added the "proxy_ssl_protocols" directive.Andrei Belov1-10/+40
2013-09-04Handling of ngx_int_t != intptr_t case.Maxim Dounin2-5/+5
Casts between pointers and integers produce warnings on size mismatch. To silence them, cast to (u)intptr_t should be used. Prevoiusly, casts to ngx_(u)int_t were used in some cases, and several ngx_int_t expressions had no casts. As of now it's mostly style as ngx_int_t is defined as intptr_t.
2013-09-04Win32: $request_time fixed.Maxim Dounin1-1/+1
On win32, time_t is 64 bits wide by default, and passing an ngx_msec_int_t argument for %T format specifier doesn't work. This doesn't manifest itself on other platforms as time_t and ngx_msec_int_t are usually of the same size.
2013-09-04Win32: Borland C compatibility fixes.Maxim Dounin4-7/+11
Several false positive warnings silenced, notably W8012 "Comparing signed and unsigned" (due to u_short values promoted to int), and W8072 "Suspicious pointer arithmetic" (due to large type values added to pointers). With this patch, it's now again possible to compile nginx using bcc32, with options we normally compile on win32 minus ipv6 and ssl.
2013-09-04Win32: Open Watcom C compatibility fixes.Maxim Dounin1-1/+1
Precompiled headers are disabled as they lead to internal compiler errors with long configure lines. Couple of false positive warnings silenced. Various win32 typedefs are adjusted to work with Open Watcom C 1.9 headers. With this patch, it's now again possible to compile nginx using owc386, with options we normally compile on win32 minus ipv6 and ssl.
2013-08-29Referer: fixed hostname buffer overflow check.Valentin Bartenev1-3/+3
Because of premature check the effective buffer size was 255 symbols while the buffer is able to handle 256.
2013-08-29Referer: "server_names" parsing deferred to merge phase.Sergey Kandaurov1-33/+45
This allows to approach "server_name" values specified below the "valid_referers" directive when used within the "server_names" parameter, e.g.: server_name example.org; valid_referers server_names; server_name example.com; As a bonus, this fixes bogus error with "server_names" specified several times.
2013-08-29Referer: fixed server_name regex matching.Sergey Kandaurov1-22/+67
The server_name regexes are normally compiled for case-sensitive matching. This violates case-insensitive obligations in the referer module. To fix this, the host string is converted to lower case before matching. Previously server_name regex was executed against the whole referer string after dropping the scheme part. This could led to an improper matching, e.g.: server_name ~^localhost$; valid_referers server_names; Referer: http://localhost/index.html It was changed to look only at the hostname part. The server_name regexes are separated into another array to not clash with regular regexes.
2013-08-29Referer: fixed error type usage inconsistency for ngx_http_add*().Sergey Kandaurov1-15/+15
2013-08-28Image filter: large image handling.Lanshun Zhou1-1/+6
If Content-Length header is not set, and the image size is larger than the buffer size, client will hang until a timeout occurs. Now NGX_HTTP_UNSUPPORTED_MEDIA_TYPE is returned immediately. diff -r d1403de41631 -r 4fae04f332b4 src/http/modules/ngx_http_image_filter_module.c
2013-07-30Autoindex: improved ngx_de_info() error handling.Sergey Kandaurov1-1/+1
This allows to build a directory listing whenever a loop exists in symbolic link resolution of the path argument.
2013-07-30Autoindex: return NGX_ERROR on error if headers were sent.Sergey Kandaurov1-2/+2
This prevents ngx_http_finalize_request() from issuing ngx_http_special_response_handler() on a freed context.