Project

General

Profile

[Solved] HTTP Get response with chunked transfer encoding

Added by msanchom 3 months ago

Hi,
any suggestion into how to achieve/force http responses with chunked transfer encoding?
what config is needed apart from stream-response-body?
what modules are needed?

I am sending a HTTP 1.1 GET for a file present in lighttpd file system, lighttpd always sends the Content-Length.

HTTP Client: curl
HTTP Server: lighttpd/1.4.45 (on CentOS 7)
Configuration: the default lighttpd config with
server.stream-response-body = 1
Thanks


Replies (4)

RE: HTTP Get response with chunked transfer encoding - Added by gstrauss 3 months ago

any suggestion into how to achieve/force http responses with chunked transfer encoding?

Why do you need that?

If lighttpd knows the content length, lighttpd sends Content-Length. If lighttpd does not know the content length from a dynamic response (e.g. CGI or FastCGI) and server.stream-response-body = 1, and the client is HTTP/1.1, then lighttpd sends Transfer-Encoding: chunked.

RE: HTTP Get response with chunked transfer encoding - Added by msanchom 3 months ago

thanks, will try dynamic response

RE: HTTP Get response with chunked transfer encoding - Added by gstrauss 3 months ago

Why do you require Transfer-Encoding: chunked ? Sending Content-Length is nearly the same as sending Transfer-Encoding: chunked and the entire response in a single HTTP chunked block.

RE: HTTP Get response with chunked transfer encoding - Added by msanchom 2 months ago

I need the Transfer-Encoding: chunked in response to test the chunked te support in http client

    (1-4/4)