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
When serving files with actix_files::Files::new().redirect_to_slash_directory() the redirect response to the client should have status code 308 (permanent redirect) or 301 (moved permanently).
Current Behavior
Currently the response has status code 302 (found).
302 is the wrong status in this case. MDN says that search engines ignore temporary redirects. In this case the redirect is permanent, because we want all requests forever and always to use a trailing slash.
Your Environment
Rust Version 1.83.0
Actix Web Version: 4.9.0
Firefox Version 133
The text was updated successfully, but these errors were encountered:
Expected Behavior
When serving files with
actix_files::Files::new().redirect_to_slash_directory()
the redirect response to the client should have status code 308 (permanent redirect) or 301 (moved permanently).Current Behavior
Currently the response has status code 302 (found).
Steps to Reproduce (for bugs)
The culprit is this
HttpResponse::Found()
actix-web/actix-files/src/service.rs
Lines 142 to 153 in 5aeb0dd
Context
302 is the wrong status in this case. MDN says that search engines ignore temporary redirects. In this case the redirect is permanent, because we want all requests forever and always to use a trailing slash.
Your Environment
The text was updated successfully, but these errors were encountered: