Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Facing issue in URL encoding and decoding when URL has umlauts/double byte character.

$
0
0

Hi,
I have a java application deployed in weblogic. IIS is the http server used here as a proxy. All the user requests will be processed using  IIS server, which will redirect request to weblogic.
This works fine for all the URLs except for those which have German umlaut or Japanese double byte characters.


If my original URL looks like this,
http://10.146.237.47/workspace/browse/get/BRIO/BRIODRIFT/BRIO%20-%20Milj%c3%b6verifiering.txt

In this URL, german umlaut character ö(LATIN SMALL LETTER O WITH DIAERESIS), is been encoded to %c3%b6

URL-Quoted  %C3%B6
HTML-Escape  ö

then the issue I am facing here is, IIS is decoding this URL as /workspace/browse/get/BRIO/BRIODRIFT/BRIO%20-%20Milj%F6verifiering.txt and passing the same to weblogic. But weblogic is expecting the format as I pasted above(%c3%b6 format)

Unicode 
Codepos.  Zeichen   UTF-8(hex.)      Name 
U+00F6    ö         c3 b6            LATIN SMALL LETTER O WITH DIAERESIS

IIS is using Unicode Codepos where as for the weblogic UTF-8(hex.), is expected.

I have tried to debug this on IIS side and found the final request sent to weblogic from IIS is not the one that is desired. In IIS log file, it says that UTF-8 charset is used. But for encoding the URL IIS is not using UTF-8. I have pasted the log details at the end.

I have tried doing some changes in web.config and machine.config like,

<globalization
                requestEncoding="utf-8"
                responseEncoding="utf-8"
    fileEncoding="utf-8"
    culture="de-DE"
    uiCulture="de-DE"
    enableClientBasedCulture="true"
        />

But these changes, have no affect on encoding.

I have also tried, adding keys as per Http.sys registry settings for IIS provided at http://support.microsoft.com/kb/820129. I have added DWORD keys like AllowRestrictedChars = 1,  EnableNonUTF8=1, FavorUTF8=1 at,

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters

and then tried the solution provided in this link as well,

http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module

None pof these seems to have any effect on this. Please let me know what needs to be done here. Please treat as very urgent

=============New Request: [/workspace/browse/get/BRIO/BRIODRIFT/BRIO - Miljöverifiering.txt.wlforward] =================
Tue Oct 16 01:12:29 2012 <473613503643497> SSL is not being used
Tue Oct 16 01:12:29 2012 <473613503643497> resolveRequest: wlforward: /workspace/browse/get/BRIO/BRIODRIFT/BRIO - Miljöverifiering.txt
Tue Oct 16 01:12:29 2012 <473613503643497> URI is /workspace/browse/get/BRIO/BRIODRIFT/BRIO%20-%20Milj%F6verifiering.txt, len=70
Tue Oct 16 01:12:29 2012 <473613503643497> Request URI = [/workspace/browse/get/BRIO/BRIODRIFT/BRIO%20-%20Milj%F6verifiering.txt]
Tue Oct 16 01:12:29 2012 <473613503643497> attempt #0 out of a max of 5
Tue Oct 16 01:12:29 2012 <473613503643497> Trying a pooled connection for 'H000230/45000/45000'
Tue Oct 16 01:12:29 2012 <473613503643497> getPooledConn: No more connections in the pool for Host[H000230] Port[45000] SecurePort[45000]
Tue Oct 16 01:12:29 2012 <473613503643497> general list: trying connect to 'H000230'/45000/45000 at line 1303 for '/workspace/browse/get/BRIO/BRIODRIFT/BRIO%20-%20Milj%F6verifiering.txt'
Tue Oct 16 01:12:29 2012 <473613503643497> INFO: New NON-SSL URL
Tue Oct 16 01:12:29 2012 <473613503643497> Connect returns -1, and error no set to 10035, msg 'Unknown error'
Tue Oct 16 01:12:29 2012 <473613503643497> EINPROGRESS in connect() - selecting
Tue Oct 16 01:12:29 2012 <473613503643497> Local Port of the socket is 1883
Tue Oct 16 01:12:29 2012 <473613503643497> Remote Host H000230 Remote Port 45000
Tue Oct 16 01:12:29 2012 <473613503643497> general list: created a new connection to 'H000230'/45000 for '/workspace/browse/get/BRIO/BRIODRIFT/BRIO%20-%20Milj%F6verifiering.txt', Local port: 1883
Tue Oct 16 01:12:29 2012 <473613503643497> WLS info in sendRequest:  H000230:45000 recycled? 0
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from client:[Accept]=[image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from client:[Accept-Encoding]=[gzip, deflate]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from client:[Accept-Language]=[en-us]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from client:[Cookie]=[JSESSIONID=nWJBQ8rJYLhTqqKJv9Jqz93kTHZQbCpRcgjQxTxbhHskN0SmTWBw!-1690772907; ORA_EPMWS_timeZone=-330; timeZone=-330]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from client:[Host]=[10.146.237.47]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from client:[User-Agent]=[Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2)]
Tue Oct 16 01:12:29 2012 <473613503643497> URL::sendHeaders(): meth='GET' file='/workspace/browse/get/BRIO/BRIODRIFT/BRIO%20-%20Milj%F6verifiering.txt' protocol='HTTP/1.1'
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[Accept]=[image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[Accept-Encoding]=[gzip, deflate]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[Accept-Language]=[en-us]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[Cookie]=[JSESSIONID=nWJBQ8rJYLhTqqKJv9Jqz93kTHZQbCpRcgjQxTxbhHskN0SmTWBw!-1690772907; ORA_EPMWS_timeZone=-330; timeZone=-330]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[Host]=[10.146.237.47]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[User-Agent]=[Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2)]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[Connection]=[Keep-Alive]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[WL-Proxy-Client-IP]=[10.178.51.119]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[Proxy-Client-IP]=[10.178.51.119]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[X-Forwarded-For]=[10.178.51.119]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[WL-Proxy-Client-Keysize]=[]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[WL-Proxy-Client-Secretkeysize]=[]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[X-WebLogic-KeepAliveSecs]=[30]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[X-WebLogic-Force-JVMID]=[-1690772907]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to WLS:[WL-Proxy-SSL]=[false]
Tue Oct 16 01:12:29 2012 <473613503643497> URL::parseHeaders: CompleteStatusLine set to [HTTP/1.1 200 OK]
Tue Oct 16 01:12:29 2012 <473613503643497> URL::parseHeaders: StatusLine set to [200 OK]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from WLS:[Date]=[Tue, 16 Oct 2012 05:12:29 GMT]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from WLS:[Transfer-Encoding]=[chunked]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from WLS:[Content-Type]=[text/html; charset=UTF-8]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs from WLS:[X-WebLogic-JVMID]=[-1690772907]
Tue Oct 16 01:12:29 2012 <473613503643497> parsed all headers OK
Tue Oct 16 01:12:29 2012 <473613503643497> sendResponse() : uref->getStatus() = '200'
Tue Oct 16 01:12:29 2012 <473613503643497> Going to send headers to the client. Status :200 OK
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to client:[Transfer-Encoding]=[chunked]
Tue Oct 16 01:12:29 2012 <473613503643497> Hdrs to client:[Content-Type]=[text/html; charset=UTF-8]
Tue Oct 16 01:12:29 2012 <473613503643497> Content Length Unknown
Tue Oct 16 01:12:29 2012 <473613503643497> canRecycle: conn=1 status=200 isKA=1 clen=-1 isCTE=1
Tue Oct 16 01:12:29 2012 <473613503643497> closeConn: pooling for 'H000230/45000'
Tue Oct 16 01:12:29 2012 <473613503643497> request [/workspace/browse/get/BRIO/BRIODRIFT/BRIO%20-%20Milj%F6verifiering.txt] processed successfully ..................


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>