@@ -65,7 +65,7 @@ typedef struct h2_proxy_ctx {
65
65
unsigned is_ssl : 1 ;
66
66
67
67
request_rec * r ; /* the request processed in this ctx */
68
- int r_status ; /* status of request work */
68
+ apr_status_t r_status ; /* status of request work */
69
69
int r_done ; /* request was processed, not necessarily successfully */
70
70
int r_may_retry ; /* request may be retried */
71
71
int has_reusable_session ; /* http2 session is live and clean */
@@ -414,7 +414,7 @@ static int proxy_http2_handler(request_rec *r,
414
414
"setup new connection: is_ssl=%d %s %s %s" ,
415
415
ctx -> p_conn -> is_ssl , ctx -> p_conn -> ssl_hostname ,
416
416
locurl , ctx -> p_conn -> hostname );
417
- ctx -> r_status = ap_map_http_request_error ( status , HTTP_SERVICE_UNAVAILABLE ) ;
417
+ ctx -> r_status = status ;
418
418
goto cleanup ;
419
419
}
420
420
@@ -428,7 +428,7 @@ static int proxy_http2_handler(request_rec *r,
428
428
if (ctx -> cfront -> aborted ) goto cleanup ;
429
429
status = ctx_run (ctx );
430
430
431
- if (ctx -> r_status != OK && ctx -> r_may_retry && !ctx -> cfront -> aborted ) {
431
+ if (ctx -> r_status != APR_SUCCESS && ctx -> r_may_retry && !ctx -> cfront -> aborted ) {
432
432
/* Not successfully processed, but may retry, tear down old conn and start over */
433
433
if (ctx -> p_conn ) {
434
434
ctx -> p_conn -> close = 1 ;
@@ -464,12 +464,6 @@ static int proxy_http2_handler(request_rec *r,
464
464
ap_set_module_config (ctx -> cfront -> conn_config , & proxy_http2_module , NULL );
465
465
ap_log_cerror (APLOG_MARK , APLOG_DEBUG , status , ctx -> cfront ,
466
466
APLOGNO (03377 ) "leaving handler" );
467
- if (ctx -> r_status != OK ) {
468
- ap_die (ctx -> r_status , r );
469
- }
470
- else if (status != APR_SUCCESS ) {
471
- ap_die (ap_map_http_request_error (status , HTTP_SERVICE_UNAVAILABLE ), r );
472
- }
473
467
return ctx -> r_status ;
474
468
}
475
469
0 commit comments