EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElHTTPSClient 96260 Error

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#29522
Posted: 05/21/2014 13:34:38
by Juli Duke (Standard support level)
Joined: 05/21/2014
Posts: 6

I am new here and am testing SecureBlackbox, namely the HTTP Client.

At the following URL'm getting the error 96260:
http://www.mobly.com.br/ventilador-de-mesa-houston-v607m1v-vermelho-127v-89036.html

The problem analyzing packets through Wireshark is the component that is failing to process the header location in the following situation:
Location: eletro/ventiladores-portateis

Normally the header location would return like this:
Location: http://www.mobly.com.br/eletro/ventiladores-portateis

But in some cases, the webserver returns as commented above and the component except 96260 error.

Can anyone help me?
#29523
Posted: 05/21/2014 14:24:58
by Eugene Mayevski (EldoS Corp.)

Thank you for contacting us.

It's not the component fails to handle but the server fails to comply with the standards. For such buggy servers there's an event in TElHTTPSClient called OnRedirection. Unfortunately the NewURL is not modifiable so what you can do is save the new location, set some flag and *forbid* relocation. Then (after the original method returns) you can send another request to the URL saved in the event handler.

Unfortunately that's all we can suggest because the value the server returns is not just not compliant to standards, but also not recognizable - the component doesn't know whether what was provided is a relative path or the name of the domain ("eletro") followed by the absolute path (we saw buggy servers returning both variants).


Sincerely yours
Eugene Mayevski
#29524
Posted: 05/21/2014 14:56:26
by Juli Duke (Standard support level)
Joined: 05/21/2014
Posts: 6

Well, you can tell me if I purchase the software in case HTTP Client box , I can change the way OnRedirect works ? In the trial version , I obviously haven't access to the sources , so my doubt is that my access will be buying source ? Be complete ?

There is a very particular situation that, in the case of a sequence of redirects :
GET http://www.sitea.com.br/redirects/to-siteb.php - > Header Location : http://www.siteb.com.br/redirects/to-sitec.php
GET http://www.siteb.com.br/redirects/to-sitec.php - > Header Location : http://www.sitec.com.br/redirects/to-sited.php
GET http://www.sitec.com.br/redirects/to-sited.php - > Header Location : end - location.php

In this case , the Location header referer to www.sitec.com , not to the first website - www.sitea.com , in this particular case all the way to trace the Redirect to the case of the field have been changed , I have this information too. ,

Before testing the TElHTTPSClient , wore its own library to achieve certain actions such as changing the IP output of GET. With TElHTTPSClient , many things have become easier and reduces the amount of errors we have with GET.
#29525
Posted: 05/21/2014 15:09:23
by Juli Duke (Standard support level)
Joined: 05/21/2014
Posts: 6

Leveraging the support of you is good, is there any option to treat the redirect, in his case to be the content of the page in javascript: window.location.href = "new-location.php"?
#29527
Posted: 05/22/2014 00:08:16
by Eugene Mayevski (EldoS Corp.)

Quote
juliduke wrote:
Well, you can tell me if I purchase the software in case HTTP Client box , I can change the way OnRedirect works ?


With VCL edition you can patch the source code, yes.

With Java and .NET editions the situation is more complicated because the same pascal code is compiled using FreePascal/JVM and Oxygene compilers respectively. This is not a trivial task.

I think we will change NewURL to be a var (byref) parameter in SBB 12. This will break compatibility yet will allow to solve problems like yours.

Quote
juliduke wrote:
There is a very particular situation that, in the case of a sequence of redirects :


OnRedirection event would happen for each redirection so you will have the complete chain of redirections available to your code.

Quote
juliduke wrote:
Leveraging the support of you is good, is there any option to treat the redirect, in his case to be the content of the page in javascript: window.location.href = "new-location.php"?


HTTP and HTML are not related (besides historical links) and HTTP client doesn't parse HTML or execute Javascript (or in other way processes the transferred data).


Sincerely yours
Eugene Mayevski
#29529
Posted: 05/22/2014 00:33:40
by Juli Duke (Standard support level)
Joined: 05/21/2014
Posts: 6

This great... I work with Delphi...

I've done the fixes to solve the two cases I mentioned in a redirect of deriving the TElHTTPSClient class, and it worked fine.

I believe that my tests have already reached the goal we wanted. Tomorrow I'll be getting the HTTP Client package and I imagine that will add a lot here at the company.

Thank you for support.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 818 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!