summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-04-01Mp4: allow end values bigger than track duration.Roman Arutyunyan1-4/+14
If start time is within the track but end time is out of it, error "end time is out mp4 stts samples" is generated. However it's better to ignore the error and output the track until its end.
2014-03-31Core: slab log_nomem flag.Maxim Dounin1-0/+4
The flag allows to suppress "ngx_slab_alloc() failed: no memory" messages from a slab allocator, e.g., if an LRU expiration is used by a consumer and allocation failures aren't fatal. The flag is now used in the SSL session cache code, and in the limit_req module.
2014-03-31Mp4: improved logging after adding "end" support.Roman Arutyunyan1-27/+71
Despite introducing start and end crop operations existing log messages still mostly refer only to start. Logging is improved to match both cases. New debug logging is added to track entry count in atoms after cropping. Two format type mismatches are fixed as well.
2014-03-31Mp4: fixed seeking to a track end.Roman Arutyunyan1-2/+2
When "start" value is equal to a track duration the request fails with "time is out mp4 stts" like it did before track duration check was added. Now such tracks are considered short and skipped.
2014-03-24Mp4: skipped empty stss atom table in output.Sergey Kandaurov1-8/+13
The atom may have no data entries after cropping. This fixes "zero size buf in output" alerts.
2014-03-21Range filter: single_range flag in request.Maxim Dounin2-2/+5
If set, it means that response body is going to be in more than one buffer, hence only range requests with a single range should be honored. The flag is now used by mp4 and cacheable upstream responses, thus allowing range requests of mp4 files with start/end, as well as range processing on a first request to a not-yet-cached files with proxy_cache. Notably this makes it possible to play mp4 files (with proxy_cache, or with mp4 module) on iOS devices, as byte-range support is required by Apple.
2014-03-20Mp4: added "end" argument support.Roman Arutyunyan1-89/+377
2014-03-20Mp4: moved atom cropping code out of update functions.Roman Arutyunyan1-85/+176
It can now be reused for implementing mp4 end.
2014-03-17Added server-side support for PROXY protocol v1 (ticket #355).Roman Arutyunyan1-0/+18
Client address specified in the PROXY protocol header is now saved in the $proxy_protocol_addr variable and can be used in the realip module. This is currently not implemented for mail.
2014-03-17FastCGI: f->split_parts reset on request start.Maxim Dounin1-0/+11
Additionally, make sure to check for errors from ngx_http_parse_header_line() call after joining saved parts. There shouldn't be any errors, though check may help to catch bugs like missing f->split_parts reset. Reported by Lucas Molas.
2014-03-03Gzip static: fixed NGX_CONF_FLAG misuse.Valentin Bartenev1-1/+1
2014-02-19Access: supplemented the obfuscated code with a comment.Ruslan Ermilov1-1/+5
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>