-
Notifications
You must be signed in to change notification settings - Fork 4
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
Actix web 4 (beta) support for actix-plus-static-files
#1
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR and for the interest in the library! I do have some concerns, however, that I'd like to discuss.
|
actix-plus-static-files
Now that Actix 4 is released I'm willing to merge this once you consider it ready, and once it targets the release version on crates.io. |
Yes, very exciting 🎉 Thank you for your interest in merging this PR. I've just updated it to |
Thanks for the PR (the compression sounds like a great addition), however I cloned this repository to do a quick sanity check that everything works, and there seem to be some bugs, although perhaps I am missing something. Either way, I need to discuss this with you prior to merging. Firstly, I needed to add the default features of actix-web to dev dependencies in order for the basic_use example to compile at all (actix_web::main is behind a default feature), and, secondly, it looks like the |
I didn't try any of your tests (I just made sure my app worked) 😂 I suspect it may have something to do with the upstream change to how paths are matched. I'll look into this in the next few days! |
At some point, you should consider porting to
actix-web
4 (It is in beta, so no pressure to merge this right now, but I needed to make the transition as it usestokio
>= 1).You could model your changes on this pull request (which worked for me).
Note: I changed the mime type handling to use
Mime
instead ofString
. This helped get rid of a deprecation warning, but may be less efficient.Thanks for the useful crate :)
Edit: I have to fix a bug preventing all but theindex.html
from loading. Seems like the assertionassert!(ResourceDef::prefix("/").is_match("/build/bundle.js"));
failing is the cause of the problem. MaybeResourceDef
is broken. Don't merge yet.Edit: I pushed a mitigation for the change to
ResourceDef
, but users who specified"/"
as the path will now have to use""
or"/*"