diff --git libsoup/soup-cookie.c libsoup/soup-cookie.c
index b10eba8..d515cf4 100644
--- libsoup/soup-cookie.c
+++ libsoup/soup-cookie.c
@@ -255,6 +255,10 @@ parse_one_cookie (const char *header, SoupURI *origin)
 			cookie->expires = parse_date (&p);
 		} else if (MATCH_NAME ("httponly")) {
 			cookie->http_only = TRUE;
+			/* Ignore return value as this is just to
+			 * move p to the end
+			 */
+			parse_value (&p);
 		} else if (MATCH_NAME ("max-age") && has_value) {
 			char *max_age_str = parse_value (&p), *mae;
 			long max_age = strtol (max_age_str, &mae, 10);
@@ -272,6 +276,10 @@ parse_one_cookie (const char *header, SoupURI *origin)
 			}
 		} else if (MATCH_NAME ("secure")) {
 			cookie->secure = TRUE;
+			/* Ignore return value as this is just to
+			 * move p to the end
+			 */
+			parse_value (&p);
 		} else {
 			/* Ignore unknown attributes, but we still have
 			 * to skip over the value.
