Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4742 - trunk/src/http/modules

Anonymous User
July 07, 2012 05:18PM
Author: mdounin
Date: 2012-07-07 21:16:21 +0000 (Sat, 07 Jul 2012)
New Revision: 4742
URL: http://trac.nginx.org/nginx/changeset/4742/nginx

Log:
Fixed If-Range with unknown last modified time.

If modification time isn't known, skip range processing and return full
entity body instead of just ignoring If-Range. Ignoring If-Range isn't
safe as client will assume entity wasn't changed since time specified.


Modified:
trunk/src/http/modules/ngx_http_range_filter_module.c

Modified: trunk/src/http/modules/ngx_http_range_filter_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_range_filter_module.c 2012-07-07 09:35:30 UTC (rev 4741)
+++ trunk/src/http/modules/ngx_http_range_filter_module.c 2012-07-07 21:16:21 UTC (rev 4742)
@@ -174,8 +174,12 @@
goto next_filter;
}

- if (r->headers_in.if_range && r->headers_out.last_modified_time != -1) {
+ if (r->headers_in.if_range) {

+ if (r->headers_out.last_modified_time == (time_t) -1) {
+ goto next_filter;
+ }
+
if_range = ngx_http_parse_time(r->headers_in.if_range->value.data,
r->headers_in.if_range->value.len);


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4742 - trunk/src/http/modules

Anonymous User 1007 July 07, 2012 05:18PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 323
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready