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

[HTTPFile] cause chunk encoding error #80

Closed
donut opened this issue Apr 12, 2016 · 8 comments
Closed

[HTTPFile] cause chunk encoding error #80

donut opened this issue Apr 12, 2016 · 8 comments

Comments

@donut
Copy link

donut commented Apr 12, 2016

When I deliver a certain file using HTTPFile.FileResponder along with either HTTPSServer or HTTPServer, it always fails delivering the whole file. Chrome reports "net:ERR_INVALID_CHUNKED_ENCODING" in its Developer Tools Network tab.

In this gist you can see react.js file as delivered by nginx or HTTPServer. The page is super long, so it may be easier to open up the files in new tabs:

I think I have experienced this occasionally on OS X, but it happens consistently on my 512 MB DigitalOcean VM running Ubuntu 14.04.3.

@donut
Copy link
Author

donut commented Apr 22, 2016

This seems to happen as file size increases.

@donut
Copy link
Author

donut commented Apr 22, 2016

@Danappelxx was able to help me out. It looks like the issue lies within the response being a FileStream. Replacing the FileStream body with file.read() resolves the issue.

Conversation on slack

@Danappelxx
Copy link
Member

Issue has not been resolved yet.

@Danappelxx Danappelxx reopened this Apr 29, 2016
@paulofaria
Copy link
Member

paulofaria commented Apr 29, 2016

Replacing the FileStream body with file.read() resolves the issue.

That was misleading, haha. so what's left?

@Danappelxx
Copy link
Member

Well, FileStream is still broken (and hence HTTPFile), so that needs to be fixed. The workaround that I suggested to @donut was to recreate HTTPFile but use File instead of FileStream, which is not a good overall solution.

@paulofaria
Copy link
Member

Why is FileStream still broken? It's not like it was before.

@paulofaria
Copy link
Member

Did anybody test?

@Danappelxx
Copy link
Member

Sorry, I meant that we haven't fixed it yet (hence why this issue should remain open).

@paulofaria paulofaria changed the title HTTPServer/HTTPSServer with HTTPFile cause chunk encoding error [HTTPFile] cause chunk encoding error Sep 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants