View Issue Details

IDProjectCategoryView StatusLast Update
0004751JEDI VCL00 JVCL Componentspublic2009-04-22 22:24
ReporterjkelleyAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.34 
Target VersionFixed in Version3.37 
Summary0004751: JvProgramVersionCheck incorrectly uses IdHTTP.BoundPort
DescriptionJvProgramVersionCheck uses TIdHTTP's BoundPort property when it's compiled against Indy 10. This is incorrect; the intent of the code seems to be to connect to the given destination port, but setting BoundPort instead causes the client to use that its source port. This has two problems:

First, it may cause problems for particularly restrictive firewalls. (For example, if I remember correctly, "Building Internet Firewalls" says that web requests always originate from ports >= 1024 and that firewalls can restrict low-numbered source ports.)

Second, if JvProgramVersionCheck is executed twice in close succession, it tries and fails to reuse the same source port and so generates the following exception:

Project TestProject.exe raised exception class EIdSocketError with message 'Socket Error # 10048 Address already in use.'.
Additional InformationI've only tested this in JVCL 3.34, but the relevant code appears to be unchanged in JVCL 3.36.
TagsNo tags attached.

Activities

jkelley

2009-04-22 21:27

reporter   ~0015428

A workaround is to set TJvProgramVersionHTTPLocationIndy's Port property to 0 when using Indy 10. This will tell the OS to pick a random ephemeral port, which is what JVCL should be telling the OS to do anyway.

AHUser

2009-04-22 22:24

developer   ~0015429

Fixed in SVN.

Issue History

Date Modified Username Field Change
2009-04-22 21:11 jkelley New Issue
2009-04-22 21:27 jkelley Note Added: 0015428
2009-04-22 22:24 AHUser Note Added: 0015429
2009-04-22 22:24 AHUser Status new => resolved
2009-04-22 22:24 AHUser Fixed in Version => Daily / SVN
2009-04-22 22:24 AHUser Resolution open => fixed
2009-04-22 22:24 AHUser Assigned To => AHUser