-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
envoy/1.20/patches/envoy/20240725-rename-original-host-header.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/source/common/http/headers.h b/source/common/http/headers.h | ||
index a7a8a3393e..6af4a2852d 100644 | ||
--- a/source/common/http/headers.h | ||
+++ b/source/common/http/headers.h | ||
@@ -123,7 +123,7 @@ public: | ||
const LowerCaseString TriCostTime{"req-cost-time"}; | ||
const LowerCaseString TriStartTime{"req-start-time"}; | ||
const LowerCaseString TriRespStartTime{"resp-start-time"}; | ||
- const LowerCaseString EnvoyOriginalHost{"original-host"}; | ||
+ const LowerCaseString EnvoyOriginalHost{"x-envoy-original-host"}; | ||
const LowerCaseString HigressOriginalService{"x-higress-original-service"}; | ||
} AliExtendedValues; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
diff --git a/source/extensions/common/wasm/context.cc b/source/extensions/common/wasm/context.cc | ||
index 9642d8abd3..410baa856f 100644 | ||
--- a/source/extensions/common/wasm/context.cc | ||
+++ b/source/extensions/common/wasm/context.cc | ||
@@ -62,6 +62,21 @@ constexpr absl::string_view CelStateKeyPrefix = "wasm."; | ||
#if defined(ALIMESH) | ||
constexpr std::string_view ClearRouteCacheKey = "clear_route_cache"; | ||
constexpr std::string_view DisableClearRouteCache = "off"; | ||
+constexpr std::string_view SetDecoderBufferLimit = "set_decoder_buffer_limit"; | ||
+constexpr std::string_view SetEncoderBufferLimit = "set_encoder_buffer_limit"; | ||
+ | ||
+bool stringViewToUint32(std::string_view str, uint32_t& out_value) { | ||
+ try { | ||
+ unsigned long temp = std::stoul(std::string(str)); | ||
+ if (temp <= std::numeric_limits<uint32_t>::max()) { | ||
+ out_value = static_cast<uint32_t>(temp); | ||
+ return true; | ||
+ } | ||
+ } catch (const std::exception& e) { | ||
+ ENVOY_LOG_MISC(critical, "stringToUint exception '{}'", e.what()); | ||
+ } | ||
+ return false; | ||
+} | ||
#endif | ||
|
||
using HashPolicy = envoy::config::route::v3::RouteAction::HashPolicy; | ||
@@ -1280,6 +1295,16 @@ WasmResult Context::setProperty(std::string_view path, std::string_view value) { | ||
} else { | ||
disable_clear_route_cache_ = false; | ||
} | ||
+ } else if (path == SetDecoderBufferLimit && decoder_callbacks_) { | ||
+ uint32_t buffer_limit; | ||
+ if (stringViewToUint32(value, buffer_limit)) { | ||
+ decoder_callbacks_->setDecoderBufferLimit(buffer_limit); | ||
+ } | ||
+ } else if (path == SetEncoderBufferLimit && encoder_callbacks_) { | ||
+ uint32_t buffer_limit; | ||
+ if (stringViewToUint32(value, buffer_limit)) { | ||
+ encoder_callbacks_->setEncoderBufferLimit(buffer_limit); | ||
+ } | ||
} | ||
#endif | ||
if (!state->setValue(toAbslStringView(value))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters