| 931 | } |
| 932 | |
| 933 | void |
| 934 | HttpTransact::OriginDown(State *s) |
| 935 | { |
| 936 | TxnDbg(dbg_ctl_http_trans, "origin server is marked down"); |
| 937 | bootstrap_state_variables_from_request(s, &s->hdr_info.client_request); |
| 938 | build_error_response(s, HTTP_STATUS_BAD_GATEWAY, "Origin Server Marked Down", "connect#failed_connect"); |
| 939 | Metrics::Counter::increment(http_rsb.down_server_no_requests); |
| 940 | char *url_str = s->hdr_info.client_request.url_string_get_ref(nullptr); |
| 941 | int host_len; |
| 942 | const char *host_name_ptr = s->unmapped_url.host_get(&host_len); |
| 943 | std::string_view host_name{host_name_ptr, size_t(host_len)}; |
| 944 | swoc::bwprint(error_bw_buffer, "CONNECT: down server no request to {} for host='{}' url='{}'", s->current.server->dst_addr, |
| 945 | host_name, swoc::bwf::FirstOf(url_str, "<none>")); |
| 946 | Log::error("%s", error_bw_buffer.c_str()); |
| 947 | |
| 948 | TRANSACT_RETURN(SM_ACTION_SEND_ERROR_CACHE_NOOP, nullptr); |
| 949 | } |
| 950 | |
| 951 | void |
| 952 | HttpTransact::HandleBlindTunnel(State *s) |