Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't serve html video #410

Closed
nzjrs opened this issue Jul 15, 2013 · 7 comments · Fixed by #1711
Closed

Can't serve html video #410

nzjrs opened this issue Jul 15, 2013 · 7 comments · Fixed by #1711
Milestone

Comments

@nzjrs
Copy link

nzjrs commented Jul 15, 2013

As described here

pallets/flask#712

@tgs
Copy link

tgs commented Dec 13, 2013

I think that this problem might be specific to serving media to iOS devices. I encountered it with trying to serve mp3 files to my iPhone.

This stack overflow question has an answer that claims iOS likes to request particular Ranges of files.
http://stackoverflow.com/questions/19421014/

WebOb's FileApp seems to support Range: headers, with its app_iter_range() method. I haven't tried it yet, might do later today.
https://github.com/Pylons/webob/blob/master/webob/static.py

I captured the HTTP headers that iOS sent me, and they did include Range.

GET /my/mp3/file.mp3 HTTP/1.1
Host: my_web_server:80
Range: bytes=0-1
X-Playback-Session-Id: some_UUID
Accept-Encoding: identity
Accept: */*
Accept-Language: en-us
Connection: keep-alive
User-Agent: AppleCoreMedia/1.0.0.10B329 (iPhone; U; CPU OS 6_1_3 like Mac OS X; en_us)

In tcpdump, I saw that the web server sends the client a lot of data, and then eventually the iPhone sends back a lot of RST connection reset packets. I'm guessing that once the TCP data is handed off to the application, it resets the connection.

@nzjrs
Copy link
Author

nzjrs commented Dec 13, 2013

I don't disagree with your analysis of the sequence of requests, by my bug report was tested (it failed) on Chrome and Firefox on Linux and Windows

@nzjrs
Copy link
Author

nzjrs commented Dec 13, 2013

No idea about ios

@tgs
Copy link

tgs commented Dec 13, 2013

Ah, ok. I guess that I agree, I got a broken pipe with Chrome, but not with cURL.

@untitaker

This comment has been minimized.

@tylfin
Copy link

tylfin commented May 20, 2016

Is this still an issue with others? Ran into this last night will investigate
UPDATE: Investigated. Werkzeug doesn't respond properly to partial-content requests. I recreated the Chrome issue only when cache-control was set to no-cache, thus it was re-requesting the resources on loop.

@davidism
Copy link
Member

davidism commented Feb 6, 2020

It seems the issue described here was that Werkzeug didn't support 206 range responses. That was addressed in #977 in September 2016.

#1704 pointed out that there was an inconsistency with the RFC for range requests for an entire file. That's pretty much the only explanation I can think of that may be continuing to cause issues.

Given that there's been no activity on this and no reproducible examples, I'm going to consider this closed by #1711. If you're still having an issue after that's released, please open a new issue with a reproducible example.

@davidism davidism added this to the 1.0.0 milestone Feb 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants