pinosaur
/
surf.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1cbeab1
)
session gets set properly in setup()
author
Enno Boland (tox)
<tox@s01.de>
Wed, 10 Mar 2010 20:38:07 +0000
(21:38 +0100)
committer
Enno Boland (tox)
<tox@s01.de>
Wed, 10 Mar 2010 20:38:07 +0000
(21:38 +0100)
surf.c
patch
|
blob
|
history
diff --git
a/surf.c
b/surf.c
index
fe63fd4
..
cbd47a1
100644
(file)
--- a/
surf.c
+++ b/
surf.c
@@
-56,7
+56,6
@@
typedef struct {
static Display *dpy;
static Atom uriprop, findprop;
static Display *dpy;
static Atom uriprop, findprop;
-static SoupSession *session;
static Client *clients = NULL;
static GdkNativeWindow embed = 0;
static gboolean showxid = FALSE;
static Client *clients = NULL;
static GdkNativeWindow embed = 0;
static gboolean showxid = FALSE;
@@
-553,13
+552,18
@@
newclient(void) {
return c;
}
return c;
}
+void func(const char *name, const char *value, void *dummy) {
+printf("%s = %s\n", name, value);
+}
+
+
static void newrequest(WebKitWebView *v, WebKitWebFrame *f, WebKitWebResource *r, WebKitNetworkRequest *req, WebKitNetworkResponse *res, Client *c) {
SoupMessage *msg = webkit_network_request_get_message(req);
SoupMessageHeaders *h;
if(!msg)
return;
h = msg->request_headers;
static void newrequest(WebKitWebView *v, WebKitWebFrame *f, WebKitWebResource *r, WebKitNetworkRequest *req, WebKitNetworkResponse *res, Client *c) {
SoupMessage *msg = webkit_network_request_get_message(req);
SoupMessageHeaders *h;
if(!msg)
return;
h = msg->request_headers;
- soup_message_headers_
remove(h, "Cookies"
);
+ soup_message_headers_
foreach(h, func, NULL
);
}
void
}
void
@@
-675,10
+679,10
@@
setatom(Client *c, Atom a, const char *v) {
void
setup(void) {
void
setup(void) {
- SoupSession *s;
char *proxy;
char *new_proxy;
SoupURI *puri;
char *proxy;
char *new_proxy;
SoupURI *puri;
+ SoupSession *s;
/* clean up any zombies immediately */
sigchld(0);
/* clean up any zombies immediately */
sigchld(0);
@@
-687,7
+691,7
@@
setup(void) {
g_thread_init(NULL);
dpy = GDK_DISPLAY();
g_thread_init(NULL);
dpy = GDK_DISPLAY();
- s
ession
= webkit_get_default_session();
+ s = webkit_get_default_session();
uriprop = XInternAtom(dpy, "_SURF_URI", False);
findprop = XInternAtom(dpy, "_SURF_FIND", False);
uriprop = XInternAtom(dpy, "_SURF_URI", False);
findprop = XInternAtom(dpy, "_SURF_FIND", False);
@@
-697,6
+701,10
@@
setup(void) {
scriptfile = buildpath(scriptfile);
stylefile = buildpath(stylefile);
scriptfile = buildpath(scriptfile);
stylefile = buildpath(stylefile);
+ s = webkit_get_default_session();
+
+ soup_session_remove_feature_by_type(s, soup_cookie_get_type());
+
/* proxy */
if((proxy = getenv("http_proxy")) && strcmp(proxy, "")) {
new_proxy = g_strrstr(proxy, "http://") ? g_strdup(proxy) :
/* proxy */
if((proxy = getenv("http_proxy")) && strcmp(proxy, "")) {
new_proxy = g_strrstr(proxy, "http://") ? g_strdup(proxy) :