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

[Bug] ERR_CONTENT_LENGTH_MISMATCH on static files #1445

Closed
kitsuniru opened this issue Nov 27, 2022 · 4 comments
Closed

[Bug] ERR_CONTENT_LENGTH_MISMATCH on static files #1445

kitsuniru opened this issue Nov 27, 2022 · 4 comments

Comments

@kitsuniru
Copy link

kitsuniru commented Nov 27, 2022

Hi, caught an error on all frameworks that uses fasthttp (fiber, atreugo, ...) while we serving big static files
Here's another issue (but on goFiber) - gofiber/fiber#2244

Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH

How to Reproduce

  • Place a large static file in the public folder and launch server.
  • Try to open the file in a browser
  • See console or network tab.

Expected Behavior

  • Give the browser the entire file.

This bug is reproduced on latest fasthttp version - v1.42.0
On version v1.41.0 , there are no problems.

@erikdubbelboer
Copy link
Collaborator

I can't seem to reproduce this. Can you share a file and a func main() that I can just run and reproduce this?

@smalloff
Copy link

smalloff commented Nov 28, 2022

I can't seem to reproduce this. Can you share a file and a func main() that I can just run and reproduce this?

gofiber_test_bug.zip

Hi! Launch server and go 127.0.0.1:8080/ckeditor.css
Look browser debug console or network tab

@erikdubbelboer
Copy link
Collaborator

I have just released v1.43.0 which reverts the change that caused this bug.

@smalloff
Copy link

I have just released v1.43.0 which reverts the change that caused this bug.

Thanks It works.

BioniCosmos added a commit to BioniCosmos/aegle that referenced this issue Dec 3, 2022
- Upgrade fasthttp to `v1.43.0` to fix
  <valyala/fasthttp#1445>.
- More config items:
  - `Cert` for the certificate file
  - `Static.Home` for the homepage directory
  - `Static.Dashboard` for the dashboard directory
- Add a flag for specifying the config file.
- Improve error handling.
- Add routes for static files of homepage and dashboard.
- Check `nil` for `GenerateSubscription`.
- Fix the wrong generation of `type` and `descriptive-text`.
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