[Qt-interest] NTLMv1 HttpProxy in QT 4.5.3

Сергей Н sh0375 at gmail.com
Fri Jan 7 01:48:37 CET 2011


Yes, i have SSL libraries on the machine.
Problem happens not only when i try to connect via https, but even if
i'm connecting via http (through http proxy with ntlm auth).

I made a test for http connection through http proxy with ntlm auth.
I installed new Windows7 OS on my machine.
Visual Studio 2008 Team + SP1.
QT 4.7.1 - ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.7.1-vs2008.exe

on the server 3proxy is installed http://www.3proxy.ru/?l=EN
config:
---------------------------
#!/usr/local/bin/3proxy

nserver xxx.xxx.xxx.xxx

nscache 65536

users sh0375:CL:123

log d:\logs\3proxy.log D

auth strong
allow sh0375
proxy -p4777 -a

auth strong
flush
maxconn 32
socks -p4778
---------------------------------------

I open http QT example.
D:\Qt\4.7.1\examples\network\http

add these lines to httpwindow.cpp:

HttpWindow::HttpWindow(QWidget *parent)
    : QDialog(parent)
{
	QNetworkProxy proxy(QNetworkProxy::HttpProxy);
	proxy.setHostName("xxx.xxx.xxx.xxx");
	proxy.setPort(4777);
	proxy.setUser("sh0375");
	proxy.setPassword("123");
	qnam.setProxy(proxy);

launch example and try to download url http://qt.nokia.com/

receive the error:
---------------------------
HTTP
---------------------------
Download failed: Proxy requires authentication.
---------------------------
OK
---------------------------

If i turn off NTLM authorization on proxy server - add -n option -
everything is working well
proxy -p4777 -n -a

Is it bug of QT?

--
Thank you!

2011/1/1 Thiago Macieira <thiago at kde.org>:
> On Friday, 31 de December de 2010 11:14:10 Sergey wrote:
>> Downloaded 4.7.1
>> ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-4.7.1.zip
>> built using command:
>>
>> call "C:\Program Files\Microsoft Visual Studio
>> 8\\Common7\Tools\vsvars32.bat"
>> path D:\QT\4.7.1\bin\;%path%
>>
>> configure.exe -no-sql-sqlite -no-qt3support -no-phonon -platform
>> win32-msvc2005 -openssl -I D:\QT\4.5.0-vc\OpenSSL\openssl-0.9.8o\include
>> -L D:\QT\4.5.0-vc\OpenSSL\openssl-0.9.8o\out32dll
>>
>> nmake sub-src
>> nmake sub-tools
>>
>> Rebuilt program using 4.7.1, but problem remains.
>> What factors can affect on NTLM authorization in QT program?
>
> Qt's NTLM code doesn't use any external code. So there's no reason why this
> would fail for you.
>
> But, to be certain, are the SSL libraries present on the machine where loading
> fails?
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>  Senior Product Manager - Nokia, Qt Development Frameworks
>      PGP/GPG: 0x6EF45358; fingerprint:
>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>



More information about the Qt-interest-old mailing list