2

I'm using embedded Tomcat 9.0.13 in my springboot2 app sitting behind a nginx reverse proxy.

When I send a request with space, it returns 505. The request isn't even passed into the servlet so I am unable to add custom error handling in the application level.

How can I display a custom page for this 505 error? Also, is there a way to not treat this as a 505 and automatically encode the whitespaces?

eg URI: "http://app/hello world" "http://app/api?key=hello world"

Jerald Baker
  • 1,121
  • 1
  • 12
  • 48
  • 505 means `HTTP version not supported`. It's most probably not because of the whitespace. And yes - you can add custom error pages per error code - see this question https://stackoverflow.com/questions/7066192/how-to-specify-the-default-error-page-in-web-xml – Svetlin Zarev May 15 '19 at 04:14
  • From where you are hitting the URL. If it is any browser, it will encode the space to %20 probably. – DEBENDRA DHINDA May 15 '19 at 08:05

1 Answers1

0

try using character code for sapce in url param.