Welcome! Log In Create A New Profile

Advanced

chunked_transfer_encoding seems doesn't work as expected

weiyuefei
November 19, 2014 07:46AM
Hi All,

When i try to use the directive "chunked_transfer_encoding" to control the encoding type of output data, it failed to output the chunked data even thougth i turned on the directive as "chunked_transfer_encoding on;".

Here is the simple example of my config==>
location /chunked {
root /;
chunked_transfer_encoding on;
return 200 "hello\n";
}


location /unchunked {
root /;
chunked_transfer_encoding off;
return 200 "world\n";
}

And here is the results of the test bu curl.

curl -i "localhost:8345/chunked"

HTTP/1.1 200 OK
Server: nginx/1.7.7
Date: Wed, 19 Nov 2014 02:26:14 GMT
Content-Type: application/octet-stream
Content-Length: 6
Connection: keep-alive


hello


curl -i "localhost:8345/unchunked"


HTTP/1.1 200 OK
Server: nginx/1.7.7
Date: Wed, 19 Nov 2014 02:26:59 GMT
Content-Type: application/octet-stream
Content-Length: 6
Connection: keep-alive


world

======================
i am expecting that chunked data will be obtained when the request goes into the chunked location, however, the directive seems doesn't work as expected.


We are using nginx as web server, so could anyone explain that and suggest solution to resolve this issue?

Best regards,

2014-11-19



weiyuefei_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

chunked_transfer_encoding seems doesn't work as expected

weiyuefei November 19, 2014 07:46AM

Re: chunked_transfer_encoding seems doesn't work as expected

Maxim Dounin November 19, 2014 08:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready