#386 closed defect (invalid)
Extra strings when getting XML or CSV through Nginx
Reported by: | Sal Munguia | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | nginx-core | Version: | 0.8.x |
Keywords: | CSV, XML | Cc: | |
uname -a: | Linux vml-redcapproxy 2.6.18-308.13.1.el5 #1 SMP Thu Jul 26 05:45:09 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: | nginx version: nginx/0.8.55 |
Description
I have a nginx reverse proxy setup where nginx talks to apache. We are dumping an XML,CSV file, and are receiving extra characters from the dump as shown below:
CSV:
1 15043M
2 participant_id,redcap_survey_timestamp,redcap_survey_identifier,i_understand_1,secure_usage_agreement_comp>
3 - 1153 <DATA>
1154 M
1155 0M
1156 M
XML:
1 859a3M
2 <?xml version="1.0" encoding="UTF-8" ?>
3 <records>
4 <item><participant_id><![CDATA[1]]></participant_id><redcap_survey_timestamp><![CDATA[2013-02-01 14:39:44]]>>
5 - 1155 <DATA>
1156 M
1157 0M
1158 M
First column Line Number, Data precedes the line #.
Sal,
Change History (2)
comment:1 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Turns out this is a chunked encoding issue. Will work on possibly enabling it on the Nginx side. I've applied the configuration change to Apache to disable chunked encoding on the PHP pages, and that has resolved the issue. Thanks.
Fix your backend (there is a bug in mod_php which causes Apache to return chunked encoding if one uses
header("HTTP/1.1 ...")
) or upgrade nginx, see this faq entry for details.