Files
gitocean/services/context
Gusted cf157ab360 fix: always set stripped slashes on http request
- The middleware that takes care of normalizing '//user2/////repo1' to
`/user2/repo1` would only set the normalized value to the Chi (Forgejo's
http router) `RoutePath` field, so Chi would correctly do the routing.
However not all components in Forgejo (like Forgejo's `context` module)
rely on Chi to get this updated path and some still rely on the value of
`(http.Request).URL.Path`, so always set the normalized value to the
http request.
- Adjusted unit test.
- Resolves forgejo/forgejo#6822
- The related issue was caused by
https://codeberg.org/forgejo/forgejo/src/commit/751a3da979db06adc99cc64fac6aad9505fd5a96/services/context/context.go#L115
using the value of the http request on not that was set in the Chi context.
2025-02-10 12:55:11 +01:00
..
2024-08-27 21:28:56 +02:00
2024-11-28 10:12:46 +00:00
2024-03-20 12:31:05 +00:00
2024-08-02 11:10:34 +02:00