httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-test/flood flood_net_ssl.c
Date Wed, 10 Oct 2001 21:42:07 GMT
jerenkrantz    01/10/10 14:42:07

  Modified:    flood    flood_net_ssl.c
  Log:
  It'd help when testing mod_ssl if the test program could handle SSL
  buffering correctly.
  
  Call SSL_pending before doing the poll to see if we could satisfy
  the current request without reading from the raw socket.
  
  What a nightmare.  mod_ssl has probably been working for a week.  *Gag*
  
  Revision  Changes    Path
  1.10      +10 -4     httpd-test/flood/flood_net_ssl.c
  
  Index: flood_net_ssl.c
  ===================================================================
  RCS file: /home/cvs/httpd-test/flood/flood_net_ssl.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- flood_net_ssl.c	2001/08/24 04:26:39	1.9
  +++ flood_net_ssl.c	2001/10/10 21:42:07	1.10
  @@ -251,11 +251,13 @@
       int sslError, socketsRead;
   
       /* Wait until there is something to read. */
  -    socketsRead = 1;
  -    e = apr_poll(s->socket->poll, &socketsRead, LOCAL_SOCKET_TIMEOUT);
  +    if (SSL_pending(s->ssl_connection) < *buflen) {
  +        socketsRead = 1;
  +        e = apr_poll(s->socket->poll, &socketsRead, LOCAL_SOCKET_TIMEOUT);
   
  -    if (socketsRead != 1)
  -        return APR_TIMEUP;
  +        if (socketsRead != 1)
  +            return APR_TIMEUP;
  +    }
   
       e = SSL_read(s->ssl_connection, buf, *buflen);
       sslError = SSL_get_error(s->ssl_connection, e);
  @@ -270,6 +272,10 @@
           break;
       case SSL_ERROR_ZERO_RETURN: /* Peer closed connection. */
           return APR_EOF; 
  +    case SSL_ERROR_SYSCALL: /* Look at errno. */
  +        if (errno == 0)
  +            return APR_EOF;
  +        /* Continue through with the error case. */   
       case SSL_ERROR_WANT_WRITE:  /* Technically, not an error. */
       default:
           ERR_print_errors_fp(stderr);
  
  
  

Mime
View raw message