Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nginx
GitHub Repository: nginx/nginx.org
Path: blob/main/xml/en/docs/faq/chunked_encoding_from_backend.xml
1 views
1
<!--
2
Copyright (C) Nginx, Inc.
3
-->
4
5
<!DOCTYPE article SYSTEM "../../../../dtd/article.dtd">
6
7
<article name="Why nginx doesn’t handle chunked encoding
8
responses from my backend properly?"
9
link="/en/docs/faq/chunked_encoding_from_backend.html"
10
lang="en"
11
rev="2">
12
13
<section>
14
15
<para>
16
<initial>Q:</initial>
17
My backend server appears to send HTTP/1.0 responses using
18
chunked encoding but nginx doesn’t handle it correctly.
19
For instance, I’m using nginx as a frontend to my node.js
20
application and instead of pure JSON from backend, nginx
21
returns something framed in decimal numbers like
22
23
<programlisting>
24
47
25
{"error":"query error","message":"Parameter(s) missing: user,password"}
26
0
27
</programlisting>
28
29
</para>
30
31
<para>
32
&nbsp;
33
</para>
34
35
<para>
36
<initial>A:</initial>
37
Your backend violates HTTP specification (see
38
<link url="https://datatracker.ietf.org/doc/html/rfc2616#section-3.6">RFC 2616,
39
"3.6 Transfer Codings"</link>).
40
The "chunked" transfer-codings must not be used with HTTP/1.0.
41
You’d need to either fix your backend application or upgrade
42
to nginx version 1.1.4 and newer, where an additional code
43
was introduced to handle such erratic backend behavior.
44
</para>
45
46
</section>
47
48
</article>
49
50