EldoS | Feel safer!

Software components for data protection, secure storage and transfer

HTTPS proxy with 407 response

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 09/05/2014 20:09:48
by ZoĆ« Peterson (Priority Standard support level)
Joined: 05/24/2007
Posts: 20

I'm currently using SecureBlackBox VCL 11.0.248, testing HTTP proxies using Fiddler (http://www.telerik.com/fiddler), with the default settings ( and the "Require proxy authentication" setting enabled.

The code currently tries to connect using wtaNoAuthentication and an empty username/password. If that fails I set the username/password and update to wtaBasic or wtaDigest based on the response headers.

When using HTTP (not secure), it works correctly. If I have the proxy username and password set it comes back with an appropriate response, and if not the server returns a 407 error that I can handle.

When using HTTPS it works correctly if I have the username and password set, but hangs in TElSocket.HTTPConnect if they aren't. The server returns a 407 response right away, but it goes through the loop again trying to receive more data, and has to wait for the read timeout. I think it's related to these two blocks, but I don't know the code well enough to verify:

if (httpCode div 100) = 2 then //any 2xx code is acceptable as per RFC 2817
  More := false; // connection established


if ((httpCode div 100) <> 2) and (not More) then
  FBufLen := 0;
  FBufStart := 0;

"More" is set to True at the top of the function if FWebTunnelAuthentication <> wtaBasic and is never set to False anywhere else in the loop, so that second block can never be executed.

I'm using the HTTPProxy properties rather than the WebTunnel ones, but it appears that's handled automatically for me. I don't expect it matters, but I'm using Delphi XE and TElAWSS3DataStorage.

What do I need to change to make the wtaNoAuthentication case fail as soon as the server responds with the 407?
Posted: 09/07/2014 11:30:21
by Eugene Mayevski (EldoS Corp.)

Let's continue in HelpDesk ( https://www.eldos.com/helpdesk/ ) please. I have created a new support ticket based on your above message. You will see your (and only your) support tickets by following this URL. You will also get e-mail notifications about updates related to your support ticket.

Sincerely yours
Eugene Mayevski



Topic viewed 395 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!