You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: