idhttp.head(URL) and Proxy 407

Giganews Newsgroups
Subject: idhttp.head(URL) and Proxy 407
Posted by:  Indy (Igor.Colov…
Date: Tue, 14 Feb 2006

I have a problem with idhttp.head(URL), Microsoft ISA 2004 server when
using NTLM Auth.

I am using Indy 10, last snapshot.

After calling idhttp.head(URL) ISA server is returning just the HEAD.

Hypertext Transfer Protocol
    HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires
authorization to fulfill the request. Access to the Web Proxy service is
denied.  )\r\

        Request Version: HTTP/1.1
        Response Code: 407
    Via: 1.1 WINDOWS\r\

    Proxy-Authenticate: Negotiate\r\

    Proxy-Authenticate: Kerberos\r\

    Proxy-Authenticate: NTLM\r\

    Connection: Keep-Alive\r\

    Proxy-Connection: Keep-Alive\r\

    Pragma: no-cache\r\

    Cache-Control: no-cache\r\

    Content-Type: text/html\r\

    Content-Length: 4117  \r\



After that indy is blocked (until timeout) in function ProcessResponse.
    if LNeedAuth then begin
      // Read the content of Error message in temporary stream
      ReadContent; <--- Here
      Result := wnAuthRequest
    end else if (Response.ResponseCode <> 204) then begin
      Result := wnJustExit;
    end else begin
      Result := wnJustExit;

If I call idhttp.get(URL) everything is working perfectly.