spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

“Invalid URL for incoming request: Illegal character in query at index” in spring cloud gateway

Open umeshmorsu opened this issue 8 years ago • 5 comments

I have a route on gateway configured as path_route which sends query parameters with special characters such as "|". Gateway throws error saying

2018-07-02 13:47:06.460 WARN 12548 --- [ctor-http-nio-2] o.s.h.s.r.ReactorHttpHandlerAdapter : Invalid URL for incoming request: Illegal character in query at index 36: http://localhost:9002/test2?test=123|456

Is there anyway to encode the incoming route URL and escape these special characters?

umeshmorsu avatar Jul 02 '18 17:07 umeshmorsu

shouldn't the client urlencode them?

spencergibb avatar Jul 02 '18 17:07 spencergibb

Not in our use case. Client in this case is standalone product (Atlassian JIRA). JIRA users access gateway to authenticate themselves before they gets routed to Atlassian JIRA (Apache -> Gateway -> JIRA). While working through JIRA Kanban workflows these special characters are passed to gateway from JIRA instance. Unfortunately resulting above error.

umeshmorsu avatar Jul 02 '18 18:07 umeshmorsu

@spencergibb Is there anyway to do this?

umeshmorsu avatar Jul 03 '18 13:07 umeshmorsu

Have a look at my comment here. Might apply to your problem.

StarF666 avatar Aug 02 '18 09:08 StarF666

Closing due to age of the question. If you would like us to look at this issue, please comment and we will look at re-opening the issue.

spring-projects-issues avatar Jan 02 '19 18:01 spring-projects-issues