[patch] Slice filter: support for empty file.

胡聪 (hucc) hucong.c at foxmail.com
Wed Jun 21 17:24:38 UTC 2017


On Tuesday, Jun 20, 2017 11:01 PM +0300, Maxim Dounin wrote:

>On Tue, Jun 20, 2017 at 10:39:44AM +0800, 胡聪 (hucc) wrote:
>> >416 will be returned when the request has no Range HEADER and the target file is
>> >empty.  Apparently, it does not conform to the HTTP protocol. Empty file seems
>> >inevitable in the CDN service where Nginx is heavily used.
>Returning the 416 response with some headers deleted and status
>code changed to 200 doesn't look like a safe solution.
>On the other hand, changing nginx's range filter to allow range
>requests to 0-byte files should make this unneeded.  I've reopened
>ticket #1031 which is about range requests to 0-byte files, see

Looking forward to this feature! I've tried to implement this feature, and it's
a bit hard for me now.

More information about the nginx-devel mailing list