Welcome! Log In Create A New Profile

Advanced

Ranges и octet-stream

September 18, 2012 03:51AM
Здравствуйте.

Пытаемся использовать nginx как кеширующий прокси для отдачи контента. Даже в случае, когда отдаваемые файлы берутся из кеша (специально вставляю заголовок add_header X-Cached $upstream_cache_status;) - для них нет заголовка Accept-Ranges. Хотя для, например, картинок - всё ок. Как заставить nginx поддерживать Ranges для всего контента, отдаваемого из кеша?

Вот примеры заголовков:


[root@web1 ~]# curl -I "http://localhost/DoDownload?VODNumber=45439&token=12345"
HTTP/1.1 200 OK
Server: nginx/1.2.3
Date: Tue, 18 Sep 2012 07:41:57 GMT
Content-Type: application/octet-stream
Content-Length: 117313265
Connection: keep-alive
Content-Disposition: attachment; filename=Vytf68413860
Content-Transfer-Encoding: binary
X-Cached: HIT


А вот картинка:


[root@web1 conf.d]# curl -I "http://localhost/tomcat.png"
HTTP/1.1 200 OK
Server: nginx/1.2.3
Date: Tue, 18 Sep 2012 07:47:29 GMT
Content-Type: image/png
Content-Length: 5103
Connection: keep-alive
ETag: W/"5103-1333205040000"
Last-Modified: Sat, 31 Mar 2012 14:44:00 GMT
X-Cached: HIT
Accept-Ranges: bytes
Subject Author Posted

Ranges и octet-stream

Shurman September 18, 2012 03:51AM

Re: Ranges и octet-stream

Maxim Dounin September 18, 2012 06:20AM

Re: Ranges и octet-stream

Shurman September 18, 2012 11:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 229
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