You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ripple.apache.org by "Cong Liu (JIRA)" <ji...@apache.org> on 2013/07/29 08:45:49 UTC
[jira] [Updated] (RIPPLE-39) Ripple proxy not work on URLs
containing Chinese characters
[ https://issues.apache.org/jira/browse/RIPPLE-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cong Liu updated RIPPLE-39:
---------------------------
Description:
Ripple proxy server cannot handle URLs containing Chinese characters like this:
https://maps.googleapis.com/maps/api/geocode/json?address=%E6%97%A7%E9%87%91%E5%B1%B1&sensor=false
When requesting this URL, the Ripple proxy log shows:
INFO: Proxying cross origin XMLHttpRequest - https://maps.googleapis.com/maps/api/geocode/json?address=æ§éå±±&sensor=false
It's a malformed URL. I traced into the code and find it's the lib/server/proxy.js (Line 56):
55 function proxy(req, res, callback) {
56 var parsedURL = url.parse(unescape(req.query.tinyhippos_rurl)), // "unescape" translate a valid URL into a malformed one
57 proxyReqData,
58 proxyReqHeaders,
59 proxyReq;
Simply removing "unscape" fixes the bug.
was:
Ripple proxy server cannot handle URLs containing Chinese characters like this:
https://maps.googleapis.com/maps/api/geocode/json?address=%E6%97%A7%E9%87%91%E5%B1%B1&sensor=false
However, the Ripple proxy log shows:
INFO: Proxying cross origin XMLHttpRequest - https://maps.googleapis.com/maps/api/geocode/json?address=æ§éå±±&sensor=false
It's a malformed URL. I traced into the code and find it's the lib/server/proxy.js (Line 56):
55 function proxy(req, res, callback) {
56 var parsedURL = url.parse(unescape(req.query.tinyhippos_rurl)), // "unescape" translate a valid URL into a malformed one
57 proxyReqData,
58 proxyReqHeaders,
59 proxyReq;
Simply removing "unscape" fixes the bug.
> Ripple proxy not work on URLs containing Chinese characters
> -----------------------------------------------------------
>
> Key: RIPPLE-39
> URL: https://issues.apache.org/jira/browse/RIPPLE-39
> Project: Apache Ripple
> Issue Type: Bug
> Environment: os: Mac OS X 10.8.4
> node: 0.10.13
> ripple: master branch
> Reporter: Cong Liu
> Original Estimate: 1m
> Remaining Estimate: 1m
>
> Ripple proxy server cannot handle URLs containing Chinese characters like this:
> https://maps.googleapis.com/maps/api/geocode/json?address=%E6%97%A7%E9%87%91%E5%B1%B1&sensor=false
> When requesting this URL, the Ripple proxy log shows:
> INFO: Proxying cross origin XMLHttpRequest - https://maps.googleapis.com/maps/api/geocode/json?address=æ§éå±±&sensor=false
> It's a malformed URL. I traced into the code and find it's the lib/server/proxy.js (Line 56):
> 55 function proxy(req, res, callback) {
> 56 var parsedURL = url.parse(unescape(req.query.tinyhippos_rurl)), // "unescape" translate a valid URL into a malformed one
> 57 proxyReqData,
> 58 proxyReqHeaders,
> 59 proxyReq;
> Simply removing "unscape" fixes the bug.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira