You are not logged in.

#1 2015-02-07 20:09:15

CH2IS
Member
From: Wales
Registered: 2013-08-01
Posts: 18

A problem using Privoxy with suckless surf

Hi guys,

I'm having a problem with Privoxy on some sites. I use the surf web browser from suckless.org.

When I visit some sites, YouTube for example, surf spawns multiple terminal windows which seemingly try to download files.

The downloads fail with "curl: (56) Received HTTP code 403 from proxy after CONNECT".

It does this for every page I click on an affected site.

I've narrowed the problem down to Privoxy. If I disable it, then this behaviour stops.

However, short of removing Privoxy from the equation, I'm struggling to solve this problem on my own.

I'm using the default Privoxy configuration. It's incredibly irritating so any help fixing this would be much appreciated.

Regards,

Chris

Offline

#2 2015-09-08 04:16:24

lrhmf
Member
Registered: 2015-09-08
Posts: 1

Re: A problem using Privoxy with suckless surf

Hello,

I had the same issue and i found a solution here http://lists.suckless.org/dev/1501/25063.html (second patch)

Basically here's what you would change in surf.c

static gboolean
decidedownload(WebKitWebView *v, WebKitWebFrame *f, WebKitNetworkRequest *r,
        gchar *m,  WebKitWebPolicyDecision *p, Client *c) {
-    if(!webkit_web_view_can_show_mime_type(v, m)) {
+    if(!webkit_web_view_can_show_mime_type(v, m) && !webkit_web_frame_get_parent(f)) {
        webkit_web_policy_decision_download(p);
        return TRUE;
    }
    return FALSE;
}

What it does is that it launches DOWNLOAD only on the top most frame, so it excludes any window that would pop up unintentionally, like ads smile

Last edited by lrhmf (2015-09-08 04:22:10)

Offline

Board footer

Powered by FluxBB