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

Content-Length requires updating #5

Open
jabo2 opened this issue Nov 10, 2020 · 0 comments
Open

Content-Length requires updating #5

jabo2 opened this issue Nov 10, 2020 · 0 comments

Comments

@jabo2
Copy link

jabo2 commented Nov 10, 2020

While working with Nancy's GenericFileResponse in conjunction with Nancy.Gzip responses I am getting a "Connection Reset" error from Firefox and Microsoft Edge/Chrome.

After digging into it I found that the GenericFileResponse adds Content-Length to the header (which represents the length of the file in bytes) and since the stream gets compressed by Nancy.Gzip the Content-Length being sent is no longer the same as the content being sent.

I am not sure if this project is being maintained any longer, but if there is any interest I would happy to submit a pull request. I think the simplest solution may be simply removing Content-Length from the header since this field is not required.

For now the workaround I have settled on was simply removing Content-Length from the header.

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

1 participant