Product:
CF 7 BugHunt
User:
Anonymous
[
Switch Product
]
CFUG:
None
Add and View Bug Comments at the bottom of the Element.
Title:
Mixing http and https cfhttp in 1 cf request
BugID:
1346
Date Opened:
11-Apr-05
Created By:
Bjorn Jensen
Type:
Tag
Element/Element:
cfhttp
Severity:
Unexpected Results
Status:
New/Unvalidated
Adobe BugID:
Description of bug:
If you use cfhttp to fetch an image from a domain on the http protocol and then fetch an image from the https protocol and then again fetch an image from the same http domain as first time, without specifying what port to use, then it will fail to fetch the last image. Example code that will fail: <cfset a = arraynew(1)> <cfset a[1] = "http://www.google.com/intl/en/images/logo.gif"> <cfset a[2] = "https://images-na.ssl-images-amazon.com/images/G/01/marketing/prime/amazon-prime-tcg02.gif"> <cfset a[3] = "http://www.google.com/images/newspaper.gif"> <cfloop from="1" to="#arrayLen(a)#" index="I"> <cfset aa = gettickcount()> <cfhttp url="#a[I]#" method="GET" path="#expandpath('.')#\imgs\" file="#listlast(a[I], '/')#" timeout="5" throwonerror="no"> <cfoutput>Doing: #a[I]# - #gettickcount()-aa#<br></cfoutput> </cfloop> Example code that will work: <cfset a = arraynew(1)> <cfset a[1] = "http://www.google.com/intl/en/images/logo.gif"> <cfset a[2] = "https://images-na.ssl-images-amazon.com/images/G/01/marketing/prime/amazon-prime-tcg02.gif"> <cfset a[3] = "http://www.google.com/images/newspaper.gif"> <cfloop from="1" to="#arrayLen(a)#" index="I"> <cfset aa = gettickcount()> <cfhttp url="#a[I]#" method="GET" port="#iif(find('https', a[I]), 443, 80)#" path="#expandpath('.')#\imgs\" file="#listlast(a[I], '/')#" timeout="5" throwonerror="no"> <cfoutput>Doing: #a[I]# - #gettickcount()-aa#<br></cfoutput> </cfloop> More example code that will work: <cfset a = arraynew(1)> <cfset a[1] = "http://www.google.com/intl/en/images/logo.gif"> <cfset a[2] = "http://www.google.com/images/newspaper.gif"> <cfset a[3] = "https://images-na.ssl-images-amazon.com/images/G/01/marketing/prime/amazon-prime-tcg02.gif"> <cfloop from="1" to="#arrayLen(a)#" index="I"> <cfset aa = gettickcount()> <cfhttp url="#a[I]#" method="GET" path="#expandpath('.')#\imgs\" file="#listlast(a[I], '/')#" timeout="5" throwonerror="no"> <cfoutput>Doing: #a[I]# - #gettickcount()-aa#<br></cfoutput> </cfloop>
Comments:
--->
A D D Y O U R C O M M E N T S T O T H I S B U G
Please login to add comments to a bug
C O M M E N T S
Comment display is being revamped. We apologize for the delay.