unsigned int waiting_on_ping : 1;
unsigned int headers_ended : 1;
uint32_t error_code;
+ int proxy_status;
apr_bucket_brigade *input;
apr_off_t data_sent;
ap_send_interim_response(r, 1);
}
}
+ else if (r->status >= 400) {
+ proxy_dir_conf *dconf;
+ dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
+ if (ap_proxy_should_override(dconf, r->status)) {
+ apr_table_setn(r->notes, "proxy-error-override", "1");
+ nghttp2_submit_rst_stream(ngh2, NGHTTP2_FLAG_NONE,
+ frame->hd.stream_id, NGHTTP2_STREAM_CLOSED);
+ }
+ }
stream_resume(stream);
break;
case NGHTTP2_PING:
* @macro
* Version number of the http2 module as c string
*/
-#define MOD_HTTP2_VERSION "2.0.32"
+#define MOD_HTTP2_VERSION "2.0.34"
/**
* @macro
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
-#define MOD_HTTP2_VERSION_NUM 0x020020
+#define MOD_HTTP2_VERSION_NUM 0x020022
#endif /* mod_h2_h2_version_h */
ctx->id, touched, error_code);
ctx->r_done = 1;
if (touched) ctx->r_may_retry = 0;
- ctx->r_status = error_code? HTTP_BAD_GATEWAY :
- ((status == APR_SUCCESS)? OK :
- ap_map_http_request_error(status, HTTP_SERVICE_UNAVAILABLE));
+ if (apr_table_get(r->notes, "proxy-error-override")) {
+ ctx->r_status = r->status;
+ r->status = OK;
+ }
+ else {
+ ctx->r_status = error_code? HTTP_BAD_GATEWAY :
+ ((status == APR_SUCCESS)? OK :
+ ap_map_http_request_error(status, HTTP_SERVICE_UNAVAILABLE));
+ }
}
}
if (ctx->cfront->aborted) goto cleanup;
status = ctx_run(ctx);
- if (ctx->r_status != APR_SUCCESS && ctx->r_may_retry && !ctx->cfront->aborted) {
+ if (apr_table_get(r->notes, "proxy-error-override")) {
+ /* pass on out */
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, ctx->cfront,
+ "proxy-error-override status %d", ctx->r_status);
+ }
+ else if (ctx->r_status != APR_SUCCESS && ctx->r_may_retry && !ctx->cfront->aborted) {
/* Not successfully processed, but may retry, tear down old conn and start over */
if (ctx->p_conn) {
ctx->p_conn->close = 1;
ap_set_module_config(ctx->cfront->conn_config, &proxy_http2_module, NULL);
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, ctx->cfront,
- APLOGNO(03377) "leaving handler");
+ APLOGNO(03377) "leaving handler -> %d", ctx->r_status);
return ctx->r_status;
}