Path: blob/main/xml/en/docs/faq/chunked_encoding_from_backend.xml
1 views
<!--1Copyright (C) Nginx, Inc.2-->34<!DOCTYPE article SYSTEM "../../../../dtd/article.dtd">56<article name="Why nginx doesn’t handle chunked encoding7responses from my backend properly?"8link="/en/docs/faq/chunked_encoding_from_backend.html"9lang="en"10rev="2">1112<section>1314<para>15<initial>Q:</initial>16My backend server appears to send HTTP/1.0 responses using17chunked encoding but nginx doesn’t handle it correctly.18For instance, I’m using nginx as a frontend to my node.js19application and instead of pure JSON from backend, nginx20returns something framed in decimal numbers like2122<programlisting>234724{"error":"query error","message":"Parameter(s) missing: user,password"}25026</programlisting>2728</para>2930<para>31 32</para>3334<para>35<initial>A:</initial>36Your backend violates HTTP specification (see37<link url="https://datatracker.ietf.org/doc/html/rfc2616#section-3.6">RFC 2616,38"3.6 Transfer Codings"</link>).39The "chunked" transfer-codings must not be used with HTTP/1.0.40You’d need to either fix your backend application or upgrade41to nginx version 1.1.4 and newer, where an additional code42was introduced to handle such erratic backend behavior.43</para>4445</section>4647</article>484950