diff --git a/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike b/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike
index 94efa4020d3efd203c937fa2c0864a2c5f7f35ca..8dfa96d0e7295f377da2b31c7bc04f849aab6391 100644
--- a/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike
+++ b/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike
@@ -187,7 +187,14 @@ static void ponder_answer()
    {
       string n,d;
       sscanf(s,"%[!-9;-~]%*[ \t]:%*[ \t]%s",n,d);
-      headers[lower_case(n)]=d;
+      switch(n=lower_case(n))
+      {
+	 case "set-cookie":
+	    headers[n]=(headers[n]||({}))+({d});
+	    break;
+	 default:
+	    headers[n]=d;
+      }
    }
 
    // done