EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ElHTTPSClient Exception: ".... is not a valid integer value"

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#19419
Posted: 03/12/2012 11:42:49
by Sam Bortman (Priority Standard support level)
Joined: 02/13/2012
Posts: 9

Hello, Eldos.

We recently ported some code from using standard Delphi Indy's TIdHTTP to ElHTTPSClient. We're using Delphi XE.

Some of the code I ported over is analogous to the following:
Code
ElHTTPSClient1.Get('https://sample.com/blah?03@4C:475C');


It throws the following exception:
Quote

''475C'' is not a valid integer value


Notice that I don't get this exception if the colon and/or the at-sign are left out. It makes no difference if SSL is enabled and/or if I use http:// or https://, as the exception appears to be generated earlier during parsing or the URL.

Incidentally, the Indy HTTP client (TIdHTTP) had not problem parsing the above URL.

Please advise.

Thanks!
S.
#19420
Posted: 03/12/2012 12:00:00
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

What version of SecureBlackbox do you use? I had no problems accessing such URL using the latest version. Could you check if the same problem occurs with the last version.
#19421
Posted: 03/12/2012 12:18:59
by Sam Bortman (Priority Standard support level)
Joined: 02/13/2012
Posts: 9

Looks like we're using 8.2.197, released March 17th, 2011.

If a newer version is indeed available:
Would it be a simple drop-in replacement?
Are there any changes to the interfaces and/or changes to default property values?
Would the same license key work with the new version?

Thanks!
S.
#19422
Posted: 03/12/2012 12:24:21
by Vsevolod Ievgiienko (EldoS Corp.)

Quote
Would it be a simple drop-in replacement?

Yes it would.

Quote
Would the same license key work with the new version?

License key should work as well.
#19423
Posted: 03/12/2012 12:31:59
by Sam Bortman (Priority Standard support level)
Joined: 02/13/2012
Posts: 9

I'm reviewing the change logs to see what's hap with the default property values and such. I'll give the latest version a shot. Thanks!
#19424
Posted: 03/12/2012 12:46:04
by Eugene Mayevski (EldoS Corp.)

JFYI: You must encode characters in the URL parameter part. Your URL is not valid in the first place.


Sincerely yours
Eugene Mayevski
#19427
Posted: 03/12/2012 16:01:23
by Sam Bortman (Priority Standard support level)
Joined: 02/13/2012
Posts: 9

Quote
JFYI: You must encode characters in the URL parameter part. Your URL is not valid in the first place.


I never claimed it was. :)
The portion of software I ported from Indy HTTP to Eldos HTTPS is legacy. The fact of the matter is that the old Indy "just worked" and there's a lot of infrastructure built on top of this evidently-illegal use of an at-sign in the middle of the URL. I tried encoding it using percent 40, prior to posting here, but what came out the other end confused the software running on the webserver (also legacy.)
#19428
Posted: 03/12/2012 17:35:29
by Sam Bortman (Priority Standard support level)
Joined: 02/13/2012
Posts: 9

I know I'm beating on a dead horse here, since I'm using an obviously old version of SBB.... But, nevertheless, for completeness:

RFC1738 "Uniform Resource Locators", explicitly states that < (less-than) and > (greater-than) signs must also be encoded. Nevertheless, the version of ElHttpsClient we use appears to parse those correctly, even when they're not escaped.

Beyond that, the exception text itself ("is not a valid integer value") is quite meaningless to the developer.

As mentioned before, I will make an effort to test with the latest SBB, time permitting. For now, you can consider this issue settled. :)

Regards,
S.

p.s.: I'm not trying to boost my message count, here. I'm just pointing out the above so that developers who run into this issue can Google it and may land here for a bit more insight.
#19431
Posted: 03/13/2012 00:40:25
by Eugene Mayevski (EldoS Corp.)

Actually, if the code cared about those symbols, it would not fail on them even when they were incorrect. The problem with semicolon is that it was not expected anywhere after beginning of the path (semicolon is used as IP-port separator). We've improved the parser to address this specific case.


Sincerely yours
Eugene Mayevski
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

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