]> granicus.if.org Git - apache/commitdiff
need to flush output buffer before reading in proxy mode
authorDoug MacEachern <dougm@apache.org>
Fri, 29 Mar 2002 07:23:09 +0000 (07:23 +0000)
committerDoug MacEachern <dougm@apache.org>
Fri, 29 Mar 2002 07:23:09 +0000 (07:23 +0000)
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@94299 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_io.c

index 54c7b6e77250e28f7da788ce356439bb1c06db9c..b059c312c30140a39340dda7478a343826796324 100644 (file)
@@ -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);