Changeset 72b669e in mod_gnutls
- Timestamp:
- Sep 27, 2018, 1:23:25 PM (2 years ago)
- Branches:
- asyncio, debian/master, master, proxy-ticket
- Children:
- c33ef88
- Parents:
- 514d4d6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
include/mod_gnutls.h.in
r514d4d6 r72b669e 204 204 } mgs_char_buffer_t; 205 205 206 /* GnuTLS Handle */206 /** GnuTLS connection handle */ 207 207 typedef struct { 208 208 /* Server configuration record */ … … 242 242 /* Output length */ 243 243 apr_size_t output_length; 244 /* General Status */ 244 /** Connection status: 0 before (re-)handshake, 1 when up, -1 on 245 * error (checks use status < 0 or status > 0) */ 245 246 int status; 246 247 } mgs_handle_t; -
src/gnutls_io.c
r514d4d6 r72b669e 563 563 } 564 564 565 if (ctxt->status < 0) { 566 ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctxt->c, 567 "%s %s: ap_get_brigade", __func__, IS_PROXY_STR(ctxt)); 568 return ap_get_brigade(f->next, bb, mode, block, readbytes); 565 if (ctxt->status < 0) 566 { 567 ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, ctxt->c, 568 "%s: %sconnection failed, cannot provide data!", 569 __func__, IS_PROXY_STR(ctxt)); 570 apr_bucket *bucket = 571 apr_bucket_eos_create(f->c->bucket_alloc); 572 APR_BRIGADE_INSERT_TAIL(bb, bucket); 573 return APR_ECONNABORTED; 569 574 } 570 575 … … 706 711 } 707 712 708 if (ctxt->status < 0) { 709 return ap_pass_brigade(f->next, bb); 713 if (ctxt->status < 0) 714 { 715 ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, ctxt->c, 716 "%s: %sconnection failed, refusing to send.", 717 __func__, IS_PROXY_STR(ctxt)); 718 if (ctxt->is_proxy) 719 { 720 /* If mod_proxy receives an error while trying to send its 721 * request it sends an "invalid request" error to the 722 * client. By pretending we could send the request 723 * mod_proxy continues its processing and sends a proper 724 * "proxy error" message when there's no response to read. */ 725 apr_bucket *bucket = apr_bucket_eos_create(f->c->bucket_alloc); 726 APR_BRIGADE_INSERT_TAIL(bb, bucket); 727 return APR_SUCCESS; 728 } 729 else 730 return APR_ECONNABORTED; 710 731 } 711 732
Note: See TracChangeset
for help on using the changeset viewer.