Skip to content

Commit

Permalink
[filter] acceptHTTPTunnel() should send back the response before star…
Browse files Browse the repository at this point in the history
…ting its subpipeline
  • Loading branch information
pajama-coder committed Jul 2, 2024
1 parent d600ad1 commit 7c468b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/filters/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1822,10 +1822,12 @@ void TunnelServer::process(Event *evt) {
pjs::Ref<RequestHead> req_head = pjs::coerce<RequestHead>(req->head());
pjs::Ref<ResponseHead> res_head = pjs::coerce<ResponseHead>(res->head());
if (res_head->is_tunnel_ok(req_head->tunnel_type())) {
m_pipeline = sub_pipeline(0, true, Filter::output())->start();
m_pipeline = sub_pipeline(0, true, Filter::output());
}

res->write(Filter::output());

if (m_pipeline) m_pipeline->start();
}
}

Expand Down

0 comments on commit 7c468b5

Please sign in to comment.