Frame brokered HTTP responses once
This commit is contained in:
@@ -855,7 +855,13 @@ static String custom_server_dispatcher_key = "";
|
||||
int forward_request_to_worker(FastCGIRequest& request, u32 timeout_seconds = 30)
|
||||
{
|
||||
String fcgi_socket = first(server_state.config["FCGI_SOCKET_PATH"], "/run/uce.sock");
|
||||
FcgiForwardResult fwd = fcgi_forward_request(fcgi_socket, request.params, request.in, timeout_seconds);
|
||||
StringMap forward_params = request.params;
|
||||
// The broker accepted raw HTTP, but this hop is FastCGI. Without the CGI
|
||||
// marker Request::set_status() emits an HTTP status line that the FastCGI
|
||||
// reply parser correctly treats as body; the broker would then wrap that
|
||||
// complete response in a second HTTP response.
|
||||
forward_params["GATEWAY_INTERFACE"] = "CGI/1.1";
|
||||
FcgiForwardResult fwd = fcgi_forward_request(fcgi_socket, forward_params, request.in, timeout_seconds);
|
||||
request.ob_start();
|
||||
if(!fwd.ok)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user