reference reported bug at Spring: https://jira.spring.io/browse/SPR-15242 URLEncoding error in combination with DeferredResult and "%25" character in PathVariable There is a bug in combination with Percentage Encoding for the "%" character. In combination with the DeferredResult and using @PathVariable. For any other legal Percentage Encoding it works fine, except for the "%25", i.e. "%" character. Here is the code snippet: ---- @RequestMapping(value = "/test/{path_variable}", method = RequestMethod.GET) public DeferredResult<String> test(@PathVariable String path_variable) { DeferredResult<String> response = new DeferredResult<>(); LOG.info("Request for {}", path_variable); try { response.setResult("Hello World"); } catch (Error e) { LOG.debug("Error", e); } catch (Exception e) { LOG.debug("Exception", e); } return response; } ----
Created attachment 34745 [details] local log of the error
Thanks for the report. The root cause was dispatch() not taking account of the Context.dispatchersUseEncodedPaths setting. Fixed in: - trunk for 9.0.0.M18 onwards - 8.5.x for 8.5.12 onwards - 8.0.x for 8.0.42 onwards - 7.0.x for 7.0.76 onwards
Thanks for the quick fix!