Hi all,

I am going to write an application that has a simple QWidget with a 
QWebView on it, displaying a web-page. But I'm behind a proxy - within 
the area of the university - and I cannot get my program working.

I tried it with QNetworkProxy (with the type of HttpProxy), and 
setApplicationProxy() but it fails displaying this message in the console:

UNEXPECTED RESPONSE: [HTTP/1.0 403 Forbidden
Server: squid/2.6.STABLE19
Date: Mon, 10 Nov 2008 09:54:41 GMT
Content-Type: text/html
Content-Length: 979
Expires: Mon, 10 Nov 2008 09:54:41 GMT
X-Squid-Error: ERR_ACCESS_DENIED 0
X-Cache: MISS from my.proxy.host
X-Cache-Lookup: NONE from my.proxy.host:3128
Via: 1.0 my.proxy.host:3128 (squid/2.6.STABLE19)
Proxy-Connection: close

]
UNEXPECTED RESPONSE: [HTTP/1.0 403 Forbidden
Server: squid/2.6.STABLE19
Date: Mon, 10 Nov 2008 09:54:41 GMT
Content-Type: text/html
Content-Length: 979
Expires: Mon, 10 Nov 2008 09:54:41 GMT
X-Squid-Error: ERR_ACCESS_DENIED 0
X-Cache: MISS from my.proxy.host
X-Cache-Lookup: NONE from my.proxy.host:3128
Via: 1.0 my.proxy.host:3128 (squid/2.6.STABLE19)
Proxy-Connection: close

]

When I've tried with another proxy type (e.g. Socks, or 
HttpCachingProxy, it also failed to work, but that time it didn't 
display anything).

Of course, another applications (Firefox, wget) are really working with 
the proper proxy settings.

The code that I try to get it work with the proxy with:

[...]
int main(int argc, char *argv[])
{
     QApplication a(argc, argv);

     QNetworkProxy proxy;
     proxy.setType(QNetworkProxy::HttpProxy);
     proxy.setHostName("my.proxy.host"); /* without http:// */
     proxy.setPort(3128);
     QNetworkProxy::setApplicationProxy(proxy);

     test w;
     w.show();
     return a.exec();
}

What do I wrong?


Thanks,
Mark Korondi
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to