Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wildfly 13: not able to use {} [] in query string of url

Tags:

java

wildfly

Whenever i'm trying to use {} or [] in url query string getting bad request.

How i can enable this in wildfly?

eg: https://stackoverflow.com?someVar={}


2 Answers

In JBoss 7.2, I had to edit the standalone.xml and make the following change to get it working:

<http-listener name="default" socket-binding="http" allow-unescaped-characters-in-url="true" redirect-socket="https" enable-http2="true"/>

Note that I have added a new attribute called allow-unescaped-characters-in-url="true".

The -Dorg.wildfly.undertow.ALLOW_UNESCAPED_CHARACTERS_IN_URL=true didn't work.

like image 158
Anu Shibin Joseph Raj Avatar answered Sep 04 '25 00:09

Anu Shibin Joseph Raj


There is a configuration option in undertow, which allows special characters as umlauts, {}, etc in the URL.

The property is: org.wildfly.undertow.ALLOW_UNESCAPED_CHARACTERS_IN_URL, e.g.:

./bin/standalone.sh -Dorg.wildfly.undertow.ALLOW_UNESCAPED_CHARACTERS_IN_URL=true
like image 43
Federico Sierra Avatar answered Sep 04 '25 01:09

Federico Sierra