mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
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@94299 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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)
|
static int bio_bucket_in_read(BIO *bio, char *in, int inl)
|
||||||
{
|
{
|
||||||
BIO_bucket_in_t *inbio = BIO_bucket_in_ptr(bio);
|
BIO_bucket_in_t *inbio = BIO_bucket_in_ptr(bio);
|
||||||
|
SSLConnRec *sslconn = myConnConfig(inbio->f->c);
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
/* XXX: flush here only required for SSLv2;
|
/* XXX: flush here only required for SSLv2;
|
||||||
* OpenSSL calls BIO_flush() at the appropriate times for
|
* OpenSSL calls BIO_flush() at the appropriate times for
|
||||||
* the other protocols.
|
* 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);
|
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);
|
return ap_pass_brigade(f->next, bb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((status = ssl_hook_process_connection(ctx)) != APR_SUCCESS) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
while (!APR_BRIGADE_EMPTY(bb)) {
|
while (!APR_BRIGADE_EMPTY(bb)) {
|
||||||
apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
|
apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user