Skip to content

Commit ebc9c18

Browse files
committed
Refactor header storage
1 parent 39735bf commit ebc9c18

File tree

5 files changed

+565
-236
lines changed

5 files changed

+565
-236
lines changed

src/workerd/api/global-scope.c++

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ kj::Promise<DeferredProxy<void>> ServiceWorkerGlobalScope::request(kj::HttpMetho
204204
// If the request doesn't specify "Content-Length" or "Transfer-Encoding", set "Content-Length"
205205
// to the body length if it's known. This ensures handlers for worker-to-worker requests can
206206
// access known body lengths if they're set, without buffering bodies.
207+
// TODO(cleanup): It would be nice if kj::HttpHeaders had an inlined has method
207208
if (body != kj::none && newHeaders.get(kj::HttpHeaderId::CONTENT_LENGTH) == kj::none &&
208209
newHeaders.get(kj::HttpHeaderId::TRANSFER_ENCODING) == kj::none) {
209210
KJ_IF_SOME(l, requestBody.tryGetLength()) {

0 commit comments

Comments
 (0)