ripple-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcos Lin <marcos....@farport.co.uk>
Subject Ripple Proxy Hangs with Content Type "application/json;charset=UTF-8"
Date Wed, 11 Dec 2013 11:05:15 GMT
Hi,

I am testing "incubator-ripple" project and found a problem with
proxy.js as it does not recognises "application/json;charset=UTF-8"
content-type.

Here is a quick fix that I made on proxy.js:89

    if (Object.keys(req.body).length > 0) {
            var content_type = req.get("content-type"),
                json_mimetype = "application/json";

            if (content_type.slice(0, json_mimetype.length)===json_mimetype) {
                proxyReqData.body = JSON.stringify(req.body);
            } else {
                proxyReqData.form = req.body;
            }
     }

Can this be fixed in the repo?  I am happy to contribute if I knew how.

Thanks,

Marcos Lin

Mime
View raw message