Re: proxy authentication.

>I am behind a proxy and have been trying to do >proxy authentication for
>a long time. but cant get the program access >webpages. 
>I have tried doing HTProxy_add. But donot know >how to do the
>authentication part.
>I have also tried setting the http_proxy >environment variable, but the
>program does not ask for user-name, password for >the proxy.

Hello!

I've revealed the same problem when have tried to apply to proxy authentication in my programm.

For my application I use RedHat Linux 9 (2.4.20), for compilation - gcc 3.2.2. Library installed from w3c-libwww-5.4.0-4.i386.rpm.

In main function I do the next calls:

...
HTProfile_newNoCacheClient(APP_NAME, APP_VERSION);
...
HTProxy_add( "http", MY_PROXY );
HTNoProxy_add( "localhost", NULL, 0 );

HTAlert_deleteOpcode( HT_A_USER_PW );
HTAlert_add( PromptUsernameAndPassword, HT_A_USER_PW );

HTAlert_setInteractive( YES );
...

Then I apply to requested web resource.
After that:
HTEventList_loop(...);

End of main function.

So when I try to get some resource abroad proxy (www.hotmail.com e.g.) - application, after receiving "407: Proxy Authentication required", hunging up on call HTEventList_loop(...). 

When I apply to "http://localhost" (no proxy) - I receive from my local apache server authentication request. After inputing of authentication information I get html page and application ends.
By other words - without proxy everything works fine.

So what's wrong?
Does anybody already revealed such a problem and  know what to do?

Thanx in advance.
Sergey.

Received on Saturday, 23 August 2003 07:21:36 UTC