Fixing cookie handling for https/http by using curl.
[surf.git] / config.def.h
index 8a27a03..a221c86 100644 (file)
@@ -35,16 +35,21 @@ static Bool hidebackground  = FALSE;
 /* DOWNLOAD(URI, referer) */
 #define DOWNLOAD(d, r) { \
        .v = (char *[]){ "/bin/sh", "-c", \
-               "st -e /bin/sh -c \"wget '$0'" \
-               " --load-cookies ~/.surf/cookies.txt" \
-               " --user-agent '$1'" \
-               " --referer '$2' ; sleep 5\"", d, useragent, r, NULL \
+               "st -e /bin/sh -c \"curl -J -O --user-agent '$1'" \
+               " --referer '$2'" \
+               " -b ~/.surf/cookies.txt -c ~/.surf/cookies.txt '$0';" \
+               " sleep 5;\"", \
+               d, useragent, r, NULL \
        } \
 }
 
 #define MODKEY GDK_CONTROL_MASK
 
 /* hotkeys */
+/*
+ * If you use anything else but MODKEY and GDK_SHIFT_MASK, don't forget to
+ * edit the CLEANMASK() macro.
+ */
 static Key keys[] = {
     /* modifier                    keyval      function    arg             Focus */
     { MODKEY|GDK_SHIFT_MASK,GDK_r,      reload,     { .b = TRUE } },