diff options
Diffstat (limited to 'components/script/webdriver_handlers.rs')
-rw-r--r-- | components/script/webdriver_handlers.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/script/webdriver_handlers.rs b/components/script/webdriver_handlers.rs index 6c3e7deb910..3ac4362f8bd 100644 --- a/components/script/webdriver_handlers.rs +++ b/components/script/webdriver_handlers.rs @@ -299,7 +299,11 @@ pub fn handle_add_cookie( }, }; let url = document.url(); - let method = if cookie.http_only() { HTTP } else { NonHTTP }; + let method = if cookie.http_only().unwrap_or(false) { + HTTP + } else { + NonHTTP + }; let domain = cookie.domain().map(ToOwned::to_owned); reply |