Ticket #938: gnutls3-workaround.diff

File gnutls3-workaround.diff, 787 bytes (added by wilmer, at 2012-04-07T13:08:25Z)
  • lib/http_client.c

    === modified file 'lib/http_client.c'
     
    198198        int evil_server = 0;
    199199        char buffer[2048];
    200200        char *end1, *end2;
    201         int st;
     201        int st, gnutls3_workaround = FALSE;
    202202       
    203203        if( req->inpa > 0 )
    204204                b_event_remove( req->inpa );
     
    218218                               
    219219                                goto got_reply;
    220220                        }
     221                        else
     222                        {
     223                                gnutls3_workaround = TRUE;
     224                        }
    221225                }
    222226                else if( st == 0 )
    223227                {
     
    253257                                 req->ssl ? ssl_getdirection( req->ssl ) : B_EV_IO_READ,
    254258                                 http_incoming_data, req );
    255259       
    256         if( ssl_pending( req->ssl ) )
     260        if( !gnutls3_workaround && ssl_pending( req->ssl ) )
    257261                return http_incoming_data( data, source, cond );
    258262        else
    259263                return FALSE;