title

fire chief's random developer tidbits

Monday, November 19, 2012

Grizzly slashes

Glassfish uses Grizzly internally to serve up web apps and grizzly by default doesn't allow encoded slashes in URLs, returning a 400 error.  Here's how to change that setting:


asadmin set
 configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.encoded-slash-enabled=true

This came up when receiving an encrypted URL encoded string in as a path parameter to a restful JAX-RS service in Spring MVC.

http://java.net/jira/browse/JERSEY-1456

1 comment:

  1. More to the story, once this was fixed, then Spring couldn't handle it. See my question on Stack Overflow. http://stackoverflow.com/questions/13482020/encoded-slash-2f-with-spring-requestmapping-path-param-gives-http-400 which is just more proof that people don't read the whole thing. Ever. Not even me. The real answer is in the comments on the accepted answer, he never came back like I asked.

    ReplyDelete