Welcome! Log In Create A New Profile

Advanced

Re: test reading fail when use https

Maxim Dounin
June 25, 2011 04:50PM
Hello!

On Sat, Jun 25, 2011 at 04:06:30PM -0400, wandenberg wrote:

> Sorry Maxim. I didn't understood your answer.

You can't use c->recv() as it doesn't allow to peek. Using
c->recv() will result in possibly valid and required data to be
lost. And that's why normal recv() is used instead there.

> Can you explain better? Why this work for detect when users goes off on
> http, but not in https ?

Quoting just 2 days old message from the same list[1]:

% Yes, the code in question won't be able to detect SSL connection
% close with appropriate shutdown records sent by a client (as well
% as connection close with some other pending data, e.g. pipelined
% request). It is not possible to detect connection close with
% standard socket interface if there are pending data without
% reading that data first, which isn't always desired/possible.
%
% In the particular case of SSL it should be possible to use
% SSL_peek() here, but better aproach is to use OS-provided hint,
% e.g. as EV_EOF provided by kqueue interface (and used by nginx).

[1] http://nginx.org/pipermail/nginx/2011-June/027672.html

Maxim Dounin

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

test reading fail when use https

wandenberg June 25, 2011 10:49AM

Re: test reading fail when use https

Maxim Dounin June 25, 2011 03:42PM

Re: test reading fail when use https

wandenberg June 25, 2011 04:06PM

Re: test reading fail when use https

Maxim Dounin June 25, 2011 04:50PM

Re: test reading fail when use https

wandenberg June 26, 2011 09:28AM

Re: test reading fail when use https

Maxim Dounin June 26, 2011 03:54PM

Re: test reading fail when use https

wandenberg July 04, 2011 12:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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