I had a problem with sending json forward when using node.js as a proxy to prevent xss problems.
Whilst logging the data received I couldn’t find any problems.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The solution came to me when I wrote another node.js server that displayed the data received and I let that mimic the CouchDB server.
It turned out to be a non ascii character (Swedish-Å) that was the culprit. The data received was treated as raw calculating the Content-Length badly, or correct depending on your mood. 😉
The solution was to use a Buffer to convert the raw data into utf8 before calculating Content-Length.