fixed header key

This commit is contained in:
Arjix 2021-09-02 15:35:16 +03:00 committed by GitHub
parent cc0fdd8a7a
commit 51d4d296fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,8 +62,8 @@ class HttpSession {
stream, files
)
sessionCookies.putAll(res.cookies.toMap())
if (res.headers.containsKey("set-content")) {
sessionCookies.putAll(cookieStrToMap(res.headers["set-content"].toString().replace("path=/,", "")))
if (res.headers.containsKey("set-cookie")) {
sessionCookies.putAll(cookieStrToMap(res.headers["set-cookie"].toString().replace("path=/,", "")))
}
return res
}
@ -86,8 +86,8 @@ class HttpSession {
stream, files
)
sessionCookies.putAll(res.cookies.toMap())
if (res.headers.containsKey("set-content")) {
sessionCookies.putAll(cookieStrToMap(res.headers["set-content"].toString().replace("path=/,", "")))
if (res.headers.containsKey("set-cookie")) {
sessionCookies.putAll(cookieStrToMap(res.headers["set-cookie"].toString().replace("path=/,", "")))
}
return res
}