Actix web 4 (beta) support for actix-plus-static-files#1
Actix web 4 (beta) support for actix-plus-static-files#1finnbear wants to merge 15 commits intojohn01dav:masterfrom
actix-plus-static-files#1Conversation
|
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-web4 (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
Mimeinstead 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.htmlfrom loading. Seems like the assertionassert!(ResourceDef::prefix("/").is_match("/build/bundle.js"));failing is the cause of the problem. MaybeResourceDefis 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"/*"