nginx inserting extra characters in Multi-status reply body
Here’s the setup. I’ve got one server running apache/php hosting ownCloud. Among other things, I’m using to do CardDAV contact syncing. In order to make things work with my domain I have an nginx server running on the frontend as a reverse-proxy to the ownCloud server. My nginx config is as follows:
server {
listen 80;
server_name cloud.mydomain.com; location / {
proxy_set_header X-Forwarded-Host cloud.mydomain.com;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header X-Forwarded-For $remote_addr;
client_max_body_size 0;
proxy_redirect off;
proxy_pass http://server;
}
}
The problem is that when my phone does a PROPFIND on the server, nginx adds extra characters to the content body that throw the phone off. Specifically, it prepends d611\r\n at the front of the body and appends 0\r\n\r\n to the end of the content. (I got this from wireshark.) It also re-chunks the result. How do I get nginx to send the original content as-is?
The additional characters you are seeing is the chunked transfer encoding format. The number is the length of the chunk, and the \r\n‘s are delimiters. It seems that the phone does not support chunked transfer encoding (although if it declares that it supports HTTP 1.1 it is supposed to). You can disable chunked transfer encoding with the chunked_transfer_encoding directive.
chunked_transfer_encoding off;
Check more discussion of this question.
Related posts:
Leave a comment
Recent Posts
- What is the easiest way to upgrade my existing Perl 5.14 to Perl 5.16 on FreeBSD 9 using the ports system?
- Know if mysql has done its job
- Redirect https .com to https .co.uk without a valid SSL cert on .com without DNS change
- Why is it a bad idea to use customer email as from address
- 100% packets dropped on first RX queue on 3/5 raid6 iSCSI NAS devices using intel igb (resolved)





