Welcome! Log In Create A New Profile

Advanced

Re: test reading fail when use https

Maxim Dounin
June 26, 2011 03:54PM
Hello!

On Sun, Jun 26, 2011 at 09:28:29AM -0400, wandenberg wrote:

[...]

> To solve the problem of detect when users close connection on https I
> did this implementation
>
> #if (NGX_HTTP_SSL)
> if (c->ssl == NULL) {
> n = recv(c->fd, buf, 1, MSG_PEEK);
> } else {
> n = SSL_peek(c->ssl->connection, buf, 1);
> }
> #else
> n = recv(c->fd, buf, 1, MSG_PEEK);
> #endif
>
> I would like to know if you see any other problem on that and if is
> possible to this code be applied on nginx source?

SSL_peek may (and likely will in many cases) leave an error in
OpenSSL error queue, so I suspect this actually requires a bit
more code.

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: 205
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