Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: Change normalize_path_middleware redirect from 301 -> 308 #3579
Redirect path normalization with
The default redirect class is currently HTTPMovedPermanently, which works for GET and HEAD requests, but does not work well for other HTTP methods. Clients will typically handle a
Are there changes in behavior for the user?
Users will no longer lose POST data during a redirect caused by a missing trailing slash.
Related issue number
Regarding unit tests, I can imagine a couple potential paths:
Let me know what you think! I'll leave this as a WIP until I have a path forward for testing.
@@ Coverage Diff @@ ## master #3579 +/- ## ========================================== + Coverage 97.9% 97.93% +0.02% ========================================== Files 43 43 Lines 8560 8569 +9 Branches 1378 1375 -3 ========================================== + Hits 8381 8392 +11 Misses 74 74 + Partials 105 103 -2