Farid Nouri Neshat created RIPPLE-60:
----------------------------------------
Summary: Ripple proxy is not detecting `Content-Type:
application/json` properly and mishandling the request
Key: RIPPLE-60
URL: https://issues.apache.org/jira/browse/RIPPLE-60
Project: Apache Ripple
Issue Type: Bug
Reporter: Farid Nouri Neshat
Priority: Minor
Reduced test case:
1. Create a dummy server: nc -lp 1999
2. Make the following request:
{code:javascript}
curl
'http://localhost:4400/ripple/xhr_proy=ABC&tinyhippos_rurl=http%3A//localhost%3A1999'
-H 'Content-Type: application/json;charset=UTF-8' --data '{"name":"a"}'
{code}
Note that the Content-Type is `application/json;charset=UTF-8` and the body is
{{"name":"a"}}. But on the dummy server you see `content-type:
application/x-www-form-urlencoded; charset=utf-8` and the body is `name=a`.
And then you wonder why this have happened. In the code json content type is
detected like this: `req.get("content-type") === "application/json"`, which
fails in this case.
I'll be working on this and making a pull request shortly.
--
This message was sent by Atlassian JIRA
(v6.2#6252)