Welcome! Log In Create A New Profile

Advanced

Re: test reading fail when use https

Maxim Dounin
June 25, 2011 03:42PM
Hello!

On Sat, Jun 25, 2011 at 10:49:32AM -0400, wandenberg wrote:

> Hi,
>
> I use the function ngx_http_test_reading in the module Nginx Push Stream
> Module (https://github.com/wandenberg/nginx-push-stream-module) to know
> when the user goes off, but when using https this function always
> return a value on call
> n = recv(c->fd, buf, 1, MSG_PEEK);
>
> Checking what was happening and comparing with others calls on same file
> ngx_http_request.c I saw that others calls are done with c->recv instead
> of recv .
>
> On the case of https this c->recv points to ngx_ssl_recv, which can sure
> detect when user goes off.
>
> I would like to suggest to change the line
> n = recv(c->fd, buf, 1, MSG_PEEK);
> for
> n = c->recv(c, buf, 1);
>
> and
> } else if (n == -1) {
> for
> } else if ((n == -1) || (n == -2)) {
>
> to other returns on https.
>
> I'm not sure if it has any side effect, and don't know if here is the
> best place to do this suggestion, sorry if not.

There is a MSG_PEEK for reason.

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