[Qt-interest] proxy issue?

Zongheng Zhou zongheng.zhou at gmail.com
Thu May 28 22:53:26 CEST 2009


>
> Zongheng Zhou wrote:
> >> Zongheng Zhou wrote:
> >> >> Zongheng Zhou wrote:
> >> >> >I just built the QT4.5.1. I tried some examples, and it works
> >> >> > fine. However, when I tried the network examples (network/http),
> >> >> > it always returns a "SocketAccessError", with the following
> >> >> > response: "HTTP/1.1 403 Forbidden\015\nCache-Control:
> >> >> > no-cache\015\nPragma: no-cache\015\nContent-Type: text/html;
> >> >> > charset=utf-8\015\nProxy-Connection: Keep-Alive\015\nConnection:
> >> >> > Keep-Alive\015\nContent-Length: 620\015\n\015\n" Because I am
> >> >> > using proxy, I simply added the following 5 lines in the main
> >> >> > function. Is there anything else I missed?  Anybody else meet the
> >> >> > same issue? By the way, I am using Solaris, and Sun CC.
> >> >>
> >> >> Your proxy replied with error 403, indicating you're simply not
> >> >> allowed to use the proxy.
> >> >>
> >> >> It's not a request for authentication (that would be a 407). You
> >> >> should contact your network admin to find the correct coordinates
> >> >> for the proxy.
> >> >>
> >> >> --
> >> >> Thiago Macieira - thiago.macieira (AT) nokia.com
> >> >>  Senior Product Manager - Nokia, Qt Software
> >> >>      Sandakerveien 116, NO-0402 Oslo, Norway
> >> >
> >> >But the other application such as 'wget' works fine, when the
> >> > environment variable 'http_proxy' is set as the same proxy server
> >> > and port. Anything special here?
> >>
> >> It's not the same thing.
> >>
> >> You set the proxy for QTcpSocket: it's at a too low-level. You need to
> >> set it on the QHttp class or the QNetworkAccessManager.
> >
> >Thank you, Thiago. As you said, I set the proxy at QHttp object, and it
> >works good now. I am now working on qt-webkit. Is there a way to setup
> > proxy for qt-webkit?
>
> Set the proxy in the QNetworkAccessManager that WebKit uses. See the
> documentation for QWebPage to find out how to access it.
>
> It works great! Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090528/3fd893a8/attachment.html 


More information about the Qt-interest-old mailing list