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
{{ message }}
Repository navigation
Commit 4d7d661
Browse filesBrowse the repository at this point in the historyBrowse files
* feat: Support streaming request bodies
Handlers implementing StreamingRequestHandler receive the request body
unread as an InputStream, decoded lazily under the existing size cap, or
raw via StreamingRequestHandler.raw(...). Parameters, security and body
presence are still checked before the handler runs.
Also: Content-Type media ranges (type/*, */*) and a missing Content-Type
are matched against requestBody.content; Request.headers() lists all
headers; Builder.maxConcurrentStreamingRequests(...) caps concurrent
streaming requests with a 503 + Retry-After.
* feat: Separate decompression cap for streamed bodies
Builder.maxDecompressedStreamingRequestBytes(long) caps the decoded size
of a body read by a StreamingRequestHandler with any positive long, so
decoded streams are no longer held to the 2 GiB that bounds a buffered
body. Unset, it defaults to maxDecompressedRequestBytes.
* docs: Point streaming cap references at the new setting
Javadoc and README now name maxDecompressedStreamingRequestBytes where
streamed bodies are concerned. Adds an IT holding a streaming extra
route to the streaming cap, with the setters in reverse order.
* refactor: Use a stream in validateStreamingWiring
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Key abstractions:
41
41
-`com.retailsvc.http.validate.DefaultValidator` — single class using `switch` pattern-match over `Schema` subtypes. Validation failures produce RFC 9457 `application/problem+json` 400 responses.
42
42
-`com.retailsvc.http.internal.Router` — two indexes: exact path map and templated path list. Resolves `operationId` + extracted path variables for each request.
43
43
-`TypeMapper` — per-media-type request parsing and response writing; registered via `Builder.bodyMapper(...)`, with `GsonTypeMapper` auto-registered when Gson is on the classpath.
44
-
-`com.retailsvc.http.Request` — an immutable record-like carrier built from primitives (body bytes, path parameters, raw query string, a header lookup function), never the `HttpExchange`. `bytes()` returns the decoded body, `parsed()` the object produced by the `TypeMapper`.
44
+
-`com.retailsvc.http.Request` — an immutable record-like carrier built from primitives (body bytes, path parameters, raw query string, a header lookup function), never the `HttpExchange`. `bytes()` returns the decoded body, `parsed()` the object produced by the `TypeMapper`. A handler that implements `StreamingRequestHandler` instead gets the body unread: `RequestPreparationFilter` routes first, validates parameters, peeks one byte, and binds `Request.streaming(...)`, whose `bodyStream()` decodes lazily (`internal/DecodingInputStream`) under its own `long` size cap (`maxDecompressedStreamingRequestBytes`, defaulting to the buffered one), or not at all when the handler's `decodeContent()` is false; `bytes()` / `parsed()` throw. `internal/StreamingLimit` optionally caps concurrent streaming requests server-wide (503 + `Retry-After`). `internal/RequestContentType` matches `Content-Type` against `requestBody.content` for both paths.
45
45
-`com.retailsvc.http.ContentCoding` — a pluggable HTTP content coding. gzip is built in (`internal/GzipCoding`); callers register others on the builder, held per direction in `internal/ContentCodings`. `RequestBodyReader` decodes requests under the size cap and `ResponseRenderer` codes responses. See the README's "Content encoding" section for the policy.
0 commit comments