Skip to content

Commit

Permalink
fix: add websocket handshake patch
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Cainelli <fernando.cainelli-external@getyourguide.com>
  • Loading branch information
cainelli committed Dec 19, 2024
1 parent dded66f commit 1ad34d3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ http_archive(
sha256 = ENVOY_SHA256,
strip_prefix = ENVOY_REPO + "-" + ENVOY_SHA,
url = "https://github.com/" + ENVOY_ORG + "/" + ENVOY_REPO + "/archive/" + ENVOY_SHA + ".tar.gz",
patches = ["fix-websocket-handshake.patch"],
patch_args = ["-p1"],
)

load("@envoy//bazel:api_binding.bzl", "envoy_api_binding")
Expand Down
20 changes: 20 additions & 0 deletions external/fix-websocket-handshake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/source/extensions/filters/http/ext_proc/ext_proc.h b/source/extensions/filters/http/ext_proc/ext_proc.h
index 7873fca24c..ed9c69e1c2 100644
--- a/source/extensions/filters/http/ext_proc/ext_proc.h
+++ b/source/extensions/filters/http/ext_proc/ext_proc.h
@@ -433,6 +433,15 @@ public:
const ProcessorState& encodingState() { return encoding_state_; }
const ProcessorState& decodingState() { return decoding_state_; }

+ Envoy::Http::LocalErrorStatus
+ onLocalReply(const Envoy::Http::StreamFilterBase::LocalReplyData&) override {
+ ENVOY_LOG(debug, "When onLocalReply() is called, set processing_complete_ to true to skip "
+ "external processing");
+ processing_complete_ = true;
+
+ return ::Envoy::Http::LocalErrorStatus::Continue;
+ }
+
private:
void mergePerRouteConfig();
StreamOpenState openStream();

0 comments on commit 1ad34d3

Please sign in to comment.