Skip to content

Commit 40ee5aa

Browse files
committed
don’t discard cookies when parsing PUT requests
1 parent e73c6cb commit 40ee5aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/UnidocServer/Operations/Server.Operation.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ extension Server.Operation:HTTPServerOperation
223223
return nil
224224
}
225225

226+
let cookies:Server.Cookies = .init(headers[canonicalForm: "cookie"])
227+
226228
let endpoint:Server.Endpoint?
227229

228230
switch root
@@ -236,7 +238,7 @@ extension Server.Operation:HTTPServerOperation
236238

237239
if let endpoint:Server.Endpoint
238240
{
239-
self.init(endpoint: endpoint, cookies: .init())
241+
self.init(endpoint: endpoint, cookies: cookies)
240242
}
241243
else
242244
{

0 commit comments

Comments
 (0)