0

I have strange problem, I have special characters(=>) in URL which is more of business requirement(sorry, so I can't change it).

Here is specific scenario- I'm using nginx as web server and proxy passing it to App server(typical setup).

GET {{url}}/rest/77=>711

When this request goes to nginx, it just responds back with 400 Bad request and doesn't pass the request to App server.

When, I call the same service directly to App server bypassing nginx, it works fine.

GET {{url}}:8080/rest/77=>711  

I have also tried encoding 77=>711, but no luck.

I'm using POSTMAN to send these request and as far as I know, POST by default does all the encoding.

A full solution or any pointers to resolve this issue would be greatly appreciated.

Thank you for reading the question.

Red Boy
  • 101
  • 1
  • Suggest you read about unsafe characters on [this page](https://perishablepress.com/stop-using-unsafe-characters-in-urls/), which links to a couple of RFCs. In short, you need to escape use of those characters, which might work in the Nginx configuration. = is also unsafe. You might best redesign the URL structure, which shouldn't really be a business decision. – Tim Nov 19 '18 at 22:33
  • You have to encode special characters in the URL, such as `=` and `>`, when you intend to use them literally. Make this change and do not undo it. And then tell us whether you still have a problem, and what it is. – Michael Hampton Nov 19 '18 at 22:37

0 Answers0