Changes between Initial Version and Version 1 of Ticket #107, comment 17
- Timestamp:
- 06.10.2011 01:44:36 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #107, comment 17
initial v1 6 6 What we've learned: 7 7 8 1 ) Apache decodes URLs before passing the request to the backend application!8 1. Apache decodes URLs before passing the request to the backend application! \\ 9 9 As a consequence Jersey's default pattern for matching the request's path 10 segments ( [^/]+?) does *not* match if the URL contains encoded slashes10 segments (`[^/]+?`) does *not* match if the URL contains encoded slashes 11 11 (e.g. when a path is encoded *within* a path segment). This caused Jersey 12 to respond with 404. 13 The solution was to use a custom pattern ( .+) for Jersey.12 to respond with 404.\\ 13 The solution was to use a custom pattern (`.+`) for Jersey. 14 14 15 2 )By default Apache doesn't allow encoded slashes in URLs at all! Such URLs16 are refused with a 404. 15 2. By default Apache doesn't allow encoded slashes in URLs at all! Such URLs 16 are refused with a 404.\\ 17 17 The solution was to modify this behavoir by the means of Apache's 18 AllowEncodedSlashes directive.18 !AllowEncodedSlashes directive. 19 19 20 20 Thanks to JuergenN and Silke for helping to track things down!