[webkit-help] Problem with proxy authentication

Christopher Vogl gisch at sol.at
Wed Nov 10 11:59:32 PST 2010


Hi,

I'm trying to load a local html-file which in turn should load a google map.
To get the map I'm forced to authenticate with a http-proxy (squid).
In the application I use the following code to set the proxy using the
libsoup API:

char* proxy;
if ( proxy = getenv("http_proxy") ) {
        SoupURI* pURI = soup_uri_new(proxy);
        g_object_set( webkit_get_default_session(),
SOUP_SESSION_PROXY_URI, pURI, NULL );
        if (pURI)
                soup_uri_free(soupUri);
       |//g_signal_connect (session, "authenticate", G_CALLBACK
(authenticate), NULL);|
}

Instead of the google map I get a blank page on which I can right-klick
and select reload, then the map gets loaded.
I inspected the headers with wireshark and it seem as if the
authentication details are not sent at the first try.

I also tried to omit the username and password to force the session to
emit an authenticate signal and implemented the corrsponding callback.
But then a login dialog appears and the callback is never called.
(Besides, I cannot use the login dialog as there is no keayboard available).

static void authenticate (SoupSession *session, SoupMessage *msg,
SoupAuth *auth, gboolean retrying, gpointer data) {
       ...
       soup_auth_authenticate(auth, username, passwd);
       ...
}

libsoup (2.32.90) is built with option "--without gnome".
webkitGTK+ 1.3.3


I would really appreciate any help!

Regards,
Christopher Vogl




More information about the webkit-help mailing list