rewriter failed when URL contains escaped char

13 views
Skip to first unread message

victo...@gmail.com

unread,
Mar 13, 2015, 11:56:06 AM3/13/15
to membrane...@googlegroups.com
Hi, I'm not sure if I did it wrong but the rewriter tag failed whenever the incoming URL contains escaped characters like double-quote, %7B etc. Here is the config:

<rewriter>
<map do="rewrite" from="^/api/v2/Ticket/(.+)" to="/REST/v2/Ticket/$1" />
</rewriter> 

It works fine for URL - http://host/api/v2/Ticket/123, we got code 200 and console logging is as expected

"GET /REST/v2/Ticket/123 HTTP/1.1"

But for URL - http://host/api/v2/Ticket/123?q=%7B%7D, we got code 404 and console logging is weird

"GET /api/v2/Ticket/123?q=%7B%7D/REST/v2/Ticket/123?q={}  HTTP/1.1"

Seems whenever there is escaped chars (I aslo tried double-quote and some others) in URL, the rewriter will fail to remove the original uri from path. Is it a bug?

victo...@gmail.com

unread,
Mar 13, 2015, 2:30:01 PM3/13/15
to membrane...@googlegroups.com, victo...@gmail.com
BTW, this was tested on 4.0.20.

victo...@gmail.com

unread,
Mar 13, 2015, 3:07:25 PM3/13/15
to membrane...@googlegroups.com, victo...@gmail.com
OK, I found  it's a confirmed bug#157 - https://github.com/membrane/service-proxy/issues/157

But for some reason this fix wasn't included in the 4.0.20 release. Could you please include it in the next release 4.0.21?

Thanks in advance!

Thomas Bayer

unread,
Mar 13, 2015, 4:44:16 PM3/13/15
to membrane...@googlegroups.com
Hi Victor,
maybe a regression, but I am not sure if Issue 157 is about the same bug. We will have a look at it.

Thanks for reporting,

Cheers,
Thomas

Am 13.03.15 um 20:07 schrieb victo...@gmail.com:
--
You received this message because you are subscribed to the Google Groups "membrane-monitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to membrane-monit...@googlegroups.com.
To post to this group, send email to membrane...@googlegroups.com.
Visit this group at http://groups.google.com/group/membrane-monitor.
For more options, visit https://groups.google.com/d/optout.

Victor Weng

unread,
Mar 13, 2015, 5:20:28 PM3/13/15
to membrane...@googlegroups.com
It is. I just replaced the file with new version and everything just work now. 
You received this message because you are subscribed to a topic in the Google Groups "membrane-monitor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/membrane-monitor/WYCCwcLsZnc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to membrane-monit...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages