Commit 0c954617 authored by Doug MacEachern's avatar Doug MacEachern
Browse files

need to flush output buffer before reading in proxy mode

need to call ssl_hook_process_connection in the output filter in proxy
mode, since proxy hits the output filter before the input filter


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@94299 13f79535-47bb-0310-9956-ffa450edef68
parent 03c4691c
Loading
Loading
Loading
Loading
+6 −1
Changes for ssl_engine_io.c: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -353,13 +353,14 @@ static int char_buffer_write(char_buffer_t *buffer, char *in, int inl)
static int bio_bucket_in_read(BIO *bio, char *in, int inl)
{
    BIO_bucket_in_t *inbio = BIO_bucket_in_ptr(bio);
    SSLConnRec *sslconn = myConnConfig(inbio->f->c);
    int len = 0;

    /* XXX: flush here only required for SSLv2;
     * OpenSSL calls BIO_flush() at the appropriate times for
     * the other protocols.
     */
    if (SSL_version(inbio->ssl) == SSL2_VERSION) {
    if ((SSL_version(inbio->ssl) == SSL2_VERSION) || sslconn->is_proxy) {
        BIO_bucket_flush(inbio->wbio);
    }

@@ -586,6 +587,10 @@ static apr_status_t ssl_io_filter_Output(ap_filter_t *f,
        return ap_pass_brigade(f->next, bb);
    }

    if ((status = ssl_hook_process_connection(ctx)) != APR_SUCCESS) {
        return status;
    }

    while (!APR_BRIGADE_EMPTY(bb)) {
        apr_bucket *bucket = APR_BRIGADE_FIRST(bb);