Search code examples
urltapestry

Tapestry "/" in parameters bug


If I add slash / to the parameter of a page, even in encoded form %2F I get an error.

Sample URL:

http://mywebsite.com/somepage?param=dfgdfg%2F

Error:

Input string 'dfgdfg/' is not valid; the character '/' at position 7 is not valid.

I am trying to pass whole URL as parameter (to later redirect user to that URL) so there are a lot of slashes in there.

Is this a bug? Is there any workaround?

I could theoretically replace all slashes with something else than %2F but that is something I would attempt after everything else fails...


Solution

  • As I've learned this happens on Jetty only, which I use for development...

    This custom service override solved the problem:

    http://tapestry.1045711.n5.nabble.com/Customising-T5-URL-Encoding-tp2412550p2412551.html

    Looks very hacky but works :).