Maxim Dounin
June 27, 2014 03:22PM
Hello!

On Fri, Jun 27, 2014 at 02:23:47PM -0400, ura wrote:

> this stackoverflow response on the topic is one that quotes the code i
> used... i have also seen this page linked by several other pages which said
> this was a workable approach:
> http://stackoverflow.com/questions/14598565/serving-206-byte-range-through-nginx-django

I think I understand the problem of the author of this question.
I've added an answere there - most likely, it has ssi or something
like enabled for all MIME types.

> i am not blindly following anything - i am looking at all the available
> information and referred to the nginx documentation - i am using what works
> and disregarding what does not. so far i have not found an explanation of
> this situation i am experiencing in the documentation or on forums, hence i
> am here asking.
>
> in any case, i removed return 206;
> the situation did not change.
> i am unclear why removing 'return 206' would cause a 200 response to become
> a 206 response! ;)

The 206 code indicates that "this was 200, but due to Range header
only part of the actual response is returned".

> " If range requests are
> supported, the header will be added automatically."
>
> i am making a simple request for a static mp4 file via curl to nginx 1.7.2..
> i am not clear on your use of the idea of 'if range requests are supported'
> in this context. how would i know if they are supported or not?

If you don't see the Accept-Ranges header added to a response, then
range requests are not supported.

If you don't see Accept-Ranges header added to responses to a
static mp4 file, then there is something wrong in your config.
Either a response is handled in a wrong location and ends up being
handled not by nginx, or there is a filter active for some/all
responses which may modify them and hence disables range support.

If you can't trace the problematic configuration and/or not sure
it's the case, you may start testing with a clean config. E.g.,
with trivial configuration like this:

http {
include mime.types;

server {
listen 8080;

location / {
mp4;
}
}
}

A request to static mp4 file results in:

$ curl -I http://localhost:8080/mp4/test.mp4
HTTP/1.1 200 OK
Server: nginx/1.7.3
Date: Fri, 27 Jun 2014 18:38:24 GMT
Content-Type: video/mp4
Content-Length: 7147296
Last-Modified: Fri, 15 Jun 2012 15:50:37 GMT
Connection: keep-alive
ETag: "4fdb59cd-6d0f20"
Accept-Ranges: bytes

--
Maxim Dounin
http://nginx.org/

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

difficulty adding headers

ura June 27, 2014 11:50AM

Re: difficulty adding headers

Maxim Dounin June 27, 2014 12:50PM

Re: difficulty adding headers

ura June 27, 2014 12:54PM

Re: difficulty adding headers

ura June 27, 2014 12:58PM

Re: difficulty adding headers

Maxim Dounin June 27, 2014 02:08PM

Re: difficulty adding headers

ura June 27, 2014 02:23PM

Re: difficulty adding headers

ura June 27, 2014 02:50PM

Re: difficulty adding headers

Maxim Dounin June 27, 2014 03:22PM

Re: difficulty adding headers

ura June 27, 2014 07:26PM

Re: difficulty adding headers

Maxim Dounin June 27, 2014 10:02PM

Re: difficulty adding headers

ura June 28, 2014 10:44AM

Re: difficulty adding headers

ura June 28, 2014 12:17PM

Re: difficulty adding headers

Maxim Dounin June 30, 2014 03:18PM

Re: difficulty adding headers

ura June 30, 2014 04:34PM

Re: difficulty adding headers

Maxim Dounin June 30, 2014 08:34PM

Re: difficulty adding headers

ura July 04, 2014 09:48AM

Re: difficulty adding headers

Maxim Dounin July 04, 2014 12:36PM

Re: difficulty adding headers

Sophie Moussion July 25, 2014 03:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 252
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready