@@ -65,7 +65,7 @@ typedef struct h2_proxy_ctx {
6565 unsigned is_ssl : 1 ;
6666
6767 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 */
6969 int r_done ; /* request was processed, not necessarily successfully */
7070 int r_may_retry ; /* request may be retried */
7171 int has_reusable_session ; /* http2 session is live and clean */
@@ -414,7 +414,7 @@ static int proxy_http2_handler(request_rec *r,
414414 "setup new connection: is_ssl=%d %s %s %s" ,
415415 ctx -> p_conn -> is_ssl , ctx -> p_conn -> ssl_hostname ,
416416 locurl , ctx -> p_conn -> hostname );
417- ctx -> r_status = ap_map_http_request_error ( status , HTTP_SERVICE_UNAVAILABLE ) ;
417+ ctx -> r_status = status ;
418418 goto cleanup ;
419419 }
420420
@@ -428,7 +428,7 @@ static int proxy_http2_handler(request_rec *r,
428428 if (ctx -> cfront -> aborted ) goto cleanup ;
429429 status = ctx_run (ctx );
430430
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 ) {
432432 /* Not successfully processed, but may retry, tear down old conn and start over */
433433 if (ctx -> p_conn ) {
434434 ctx -> p_conn -> close = 1 ;
@@ -464,12 +464,6 @@ static int proxy_http2_handler(request_rec *r,
464464 ap_set_module_config (ctx -> cfront -> conn_config , & proxy_http2_module , NULL );
465465 ap_log_cerror (APLOG_MARK , APLOG_DEBUG , status , ctx -> cfront ,
466466 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- }
473467 return ctx -> r_status ;
474468}
475469
0 commit comments