Welcome! Log In Create A New Profile

Advanced

Re: a problem with chunked encoding

October 07, 2015 08:29AM
Maxim Dounin,

Thanks for your prompt reply~ ^ ^
Actually In my script, the tcp stream is encrypted and disguised as a normal chunked downloaded file to pass the firewall, and I need to control every chunk(the stream is encrypted in blocks, and a chunk represents a block) so that there is no specific protocol identification.

If the script cannot control the process of chunked encoding, it should have some identification so that the firewall can update itself to find out the proxy stream.

There are many web hostings that use nginx + php-fpm, so I wrote the script in PHP.

Does that mean I cannot use nginx as a web server in this way?

Nginx is an excellent web server with good proformance, I'm not willing to give up this server.

Thanks.

Maxim Dounin Wrote:
-------------------------------------------------------
> Hello!
>
> On Sun, Oct 04, 2015 at 06:03:17AM -0400, esxgx wrote:
>
> > I wrote a php script, for socks over http proxy, generating “chunked
> > encoding” format, adding a header(Transfer-Encoding: chunked)
> > and I first used apache, it works well.
> > But when I used nginx/php-fpm, I found the response chunked encoding
> twice.
> >
> > I tried to turn off chunked encoding with "chunked_transfer_encoding
> off",
> > but in the response header, there were no "Transfer-Encoding:
> chunked"
> > that i added in the php script.
>
> Don't encode FastCGI responses using chunked transfer encoding,
> this is not something nginx can tolerate.
>
> Note well that it's believed to be violation of the following
> clause in RFC 3875 (http://tools.ietf.org/html/rfc3875#section-6.3.4):
>
> : The script MUST NOT return any header fields that relate to
> : client-side communication issues and could affect the server's
> : ability to send the response to the client.
>
> When needed and possible, nginx will encode responses using
> chunked encoding itself.
>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

a problem with chunked encoding

esxgx October 04, 2015 06:03AM

Re: a problem with chunked encoding

Maxim Dounin October 05, 2015 08:42AM

Re: a problem with chunked encoding

esxgx October 07, 2015 08:29AM

Re: a problem with chunked encoding

Maxim Dounin October 07, 2015 11:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 142
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