You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
util+server: Fix bug around chunked request handling. (#6906)
This commit fixes a request handling bug introduced in #6868, which
caused OPA to treat all incoming chunked requests as if they had
zero-length request bodies.
The fix detects cases where the request body size is unknown in the
DecodingLimits handler, and propagates a request context key down to
the `util.ReadMaybeCompressedBody` function, allowing it to correctly
select between using the original `io.ReadAll` style for chunked
requests, or the newer preallocated buffers approach (for requests of
known size).
This change has a small, but barely visible performance impact for large
requests (<5% increase in GC pauses for a 1GB request JSON blob), and
minimal, if any, effect on RPS under load.
Fixes: #6904
Signed-off-by: Philip Conrad <[email protected]>
(cherry picked from commit ee9ab0b)
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,12 @@
3
3
All notable changes to this project will be documented in this file. This
4
4
project adheres to [Semantic Versioning](http://semver.org/).
5
5
6
+
## Unreleased
7
+
8
+
### Fixes
9
+
10
+
- util+server: Fix bug around chunked request handling. This PR fixes a request handling bug introduced in ([#6868](https://github.com/open-policy-agent/opa/pull/6868)), which caused OPA to treat all incoming chunked requests as if they had zero-length request bodies. ([#6906](https://github.com/open-policy-agent/opa/pull/6906)) authored by @philipaconrad
11
+
6
12
## 0.67.0
7
13
8
14
This release contains a mix of features, a new builtin function (`strings.count`), performance improvements, and bugfixes.
0 commit comments