[hackers] [surf] Fixing cookie handling for https/http by using curl. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Sat, 02 Feb 2013 15:44:15 +0100

commit d6a3e28be24a82647ba3f0b6f8dd39d0097a4c24
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Sat Feb 2 15:42:09 2013 +0100

    Fixing cookie handling for https/http by using curl.

diff --git a/config.def.h b/config.def.h
index 1cba4d7..a221c86 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -35,10 +35,11 @@ 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 \
         } \
 }
 
Received on Sat Feb 02 2013 - 15:44:15 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 02 2013 - 15:48:08 CET