We have an application (cannot be modified) in our environment that doesn't work with MWG 7.2 but works in MWG 6.8.7 perfectly.
The Java code try to access a web site but using a malformed URL containing blank spaces in it as we can see below.
[09/Oct/2012:17:31:47 -0300] "" 10.10.10.133 400 "GET http://maps.google.com/maps/geo?q=dfg max ert123&output=xml&sensor=false HTTP/1.1" "Public Information" "Minimal Risk" "text/html" 1191 "Java/1.5.0" "" "0"
I have tried to create a workaround to rewrite the blanks, but I was unable to do so. MWG cuts the URL when it sees the blank character which prevents any rule from replacing the blanks with something useful. I also tried to read the original URL from the GET request the browser sends and replace the blank by % 20, but when I do this MWG automatically encodes the % character, which causes the request to still fail.
I do not see a workaround at this time.
Since the application seems to not encode the URL while it has to the best solution would be to have the application fixed.
Maybe someone has a different approach.
This was exactly what I did and got the same results.
Additionally, I got the request first line and use substring to cut the URL from it. After encode the substring, giving me the desired result, I can't replace the first line with the correct one. Is that possible?
the Request.Header.Firstline is what the client sent. I don´t think it will help when you replace it, but instead replace the URL property, because this is what MWG uses to talk to when the Request Cycle ends. Unfortunately I have done this and MWG modifies my modified URL again in an unforseen manner, causing the request to still fail.
Can you provide the traces to Jan? He can probably help with some magic :-)