Hi Charles,

Is there a place where I can download these fixed sources from? Embedded in
the email as they are, there are loads of = 09 lines, and I'd hate to edit
out something significant by mistake.

Can I also ask - does this cause a problem if you do not, specifically, call
cfa_browser in the app (we don't).

Thanks,

Alan Ford


-----Original Message-----
From: Charles Teague <[EMAIL PROTECTED]>
To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Date: Thursday, July 13, 2000 2:12 AM
Subject: RE: Completely broken webtop


>This message is in MIME format. Since your mail reader does not understand
>this format, some or all of this message may not be legible.
>
>------_=_NextPart_000_01BFEC67.0E28402E
>Content-Type: text/plain;
> charset="iso-8859-1"
>
>Ok, I managed to isolate the problem.  Here is what I found after some
>digging:
>
>The key problem appears to be when browser agents get passed through as
>empty.  When the condition happens, cfa_browser basically goes into an
>untermintated loop trying to search for parents.
>
>What I ended up doing was two things:
>
>1) cfa_browser, when writing the agent string using browser update will
>automatically trap out empty string agents and replace them with the
>substitution 'unknown'.
>
>2) cfa_browserCacheRefresh automatically purges any empty string browsers
>from the browser.wddx file.  This means that a simple restart should get
you
>up and running right away.
>
>This is something that will have to go out in a hot fix of one form or
>another, so it will likely show up elsewhere.  I have attached the unit
>tested files- <b>they have not passed our regressions yet, so please use
>them with caution</b>.  Let me know if you hit additional problems. . .
>
>-charles
>
>
>-----Original Message-----
>From: Lanny R. Udey [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 11, 2000 10:58 AM
>To: [EMAIL PROTECTED]
>Subject: RE: Completely broken webtop
>
>
>Charles,
>
>As you know from my postings, and from the brower.wddx files that I
>sent you, we can reproduce this with Netscape 4.5 for Win 95. If you
>have a server that I can hit with this brower, I would be happy to do
>so. Have you not been able to reproduce it with this Browser?
>
>Thanks
>Lanny Udey
>Hofstra University
>[EMAIL PROTECTED]
>
>>>> Charles Teague <[EMAIL PROTECTED]> Tuesday, July 11, 2000 >>>
>So just to confirm, if you telnet to port 80, you get a corrupted
>browser
>file?  The only file modified for 101 is cfa_browser, should be dated
>3/23/00.  The added lines are at line 163- here is the modification
>made:
>
> <!--- BEGIN: Modified by -pt, conceptware ag, 22.03.2000 --->
> <cfset parentAgent = "Unknown">
> <cfloop
>condition="#Evaluate('#bNotFound#
>AND (#nCount# LE #StructCount(stBrowser)#)')#">
> <!--- END: Modified by -pt, conceptware ag, 22.03.2000
>--->
>
>Which basicallly terminates the loop if it has trouble locating a
>parent.
>
>I have been hunting for a reproducible case of the corruption on my
>end, but
>we can't get it to happen here.  If you have a case or can give me
>some
>pointers, very much appreciated!
>
>-c
>
>
>-----Original Message-----
>From: Tristan Roddis [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 11, 2000 8:00 AM
>To: '[EMAIL PROTECTED]'
>Subject: RE: Completely broken webtop
>
>
>> -----Original Message-----
>> From: Charles Teague [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, July 07, 2000 1:48 PM
>> To: '[EMAIL PROTECTED]'
>> Subject: RE: Completely broken webtop
>>
>>
>> I think it would be bad idea to do that- if it errors writing
>> to the browser
>> file is swallows and keeps chugging.  This means, however,
>> that there is
>> potential that it would have to try to write each request.
>> If you aren't
>> seeing corruption in the file itself, then I think keeping it
>> writable is
>> ok.  If there is corruption, we should get to the bottom of that!
>
>Hear, hear. We *are* using 1.01 (upgraded from 1.0) and experience
>corruption with the browser.wddx file - just telnetting to port 80 is
>enough
>to break the system, presumably due to the unrecognised browser type.
>
>Do you have any info about what cfa_ files we should check to make sure
>they
>are fully 1.01 and/or not corrupting any more?
>
>Thanks,
>
>-T.
>---------------------------------------------------------------------------
-
>--
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_tal
k
>
>or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
>---------------------------------------------------------------------------
-
>--
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_tal
k
>or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
>---------------------------------------------------------------------------
-
>--
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_tal
k
>or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
>
>
>------_=_NextPart_000_01BFEC67.0E28402E
>Content-Type: application/octet-stream;
> name="cfa_browser.cfm"
>Content-Transfer-Encoding: quoted-printable
>Content-Disposition: attachment;
> filename="cfa_browser.cfm"
>
><!---
>=09
> Template: cfa_browser.cfm
> Author:  Charles Teague
> Source Control: $Header: =
>/systemfiles/customtags/system/tier0/browser/cfa_browser.cfm 31    =
>7/12/00 8:57p Cteague $
>
> Description:
>=09
> This tag adds information about the current browser to the request =
>scope.
> This is accessible in the following way:
>
> request.cfa.browser.JAVASCRIPTVER
> request.cfa.browser.JAVAAPPLETS [TRUE|FALSE|""]
> request.cfa.browser.BROWSER [TRUE|FALSE|""]
> request.cfa.browser.FRAMES [TRUE|FALSE|""]
> request.cfa.browser.VBSCRIPT [TRUE|FALSE|""] =20
> request.cfa.browser.TABLES [TRUE|FALSE|""] =20
> request.cfa.browser.COOKIES [TRUE|FALSE|""] =20
> request.cfa.browser.VERSION [TRUE|FALSE|""] =20
> request.cfa.browser.DHTML [TRUE|FALSE|""] =20
> request.cfa.browser.JAVASCRIPT [TRUE|FALSE|""] =20
> request.cfa.browser.BACKGROUNDSOUNDS [TRUE|FALSE|""] =20
> request.cfa.browser.NAME =20
> request.cfa.browser.STYLESHEETS [TRUE|FALSE|""] =20
> request.cfa.browser.CRAWLER [TRUE|FALSE|""] =20
> request.cfa.browser.ACTIVEXCONTROLS [TRUE|FALSE|""] =20
> request.cfa.browser.USERAGENT=20
> request.cfa.browser.MAJORVERSION=20
> request.cfa.browser.MINORVERSION
> request.cfa.browser.PARENTAGENT [user_agent for parent]
> =09
>=09
> Usage:
>=09
> <cfa_browser
> userAgent =3D " . . .">
>=09
> Parent tags: none
> Children tags: none
>
>--->
>
>
>
>
><cfparam name=3D"attributes.userAgent" default=3D"#cgi.User_Agent#">
>
><!--- Only run the browser tag if it hasn't already run this request =
>--->
><cfif NOT structkeyexists(request.cfa, "browser")>
>=09
>=09
> <!--- refresh the browser cache if it isn't defined --->
> <cfif NOT isdefined("server.cfa.browser")>
>
>
> <cfa_browserCacheRefresh>
>
>
> </cfif>
>=09
> <cfset thisAgent =3D attributes.userAgent>
>=09
>=09
>=09
> <!--- set the server scope to local scope --->
> <cflock timeout=3D"5" name=3D"cfa_browser_read" type=3D"readOnly">
> <cfset stBrowser  =3D server.cfa.browser>
> </cflock>
>=09
> <cfa_dump var=3D"#stBrowser#">
> <cfabort>
>=09
>
>
> <!--- attempt to locate this user_agent in the browser definition --->
> <cfif structKeyExists(stBrowser, thisAgent)>
>
>=09
>=09
>=09
> <cfset bTopLevel =3D "false">
> <cfset stTempBrowser =3D structNew()>
> =09
> <!--- keep looping until I hit the top level --->
> <cfloop condition=3D"#bTopLevel# is false">
>
>=09
>=09
> <cfif structkeyExists(stBrowser, thisAgent)>
>
> <cfset thisBrowser =3D stBrowser[thisAgent]>
> =09
> <!--- Found: Read the information into request scope --->
> =09
> <cfif structKeyExists(thisBrowser , "ParentAgent")> =09
>
> <cfif thisBrowser.ParentAgent is thisAgent>
> <cfset thisBrowser.ParentAgent =3D "">
> </cfif>
> =09
> <!--- This entry has a parent agent --->
> <cfset thisAgent =3D thisBrowser.ParentAgent>
> <cfset bTopLevel =3D "false">
>
> <!--- Inspect the parent agent, fill in the blanks of thisAgent =
>--->
> <cfloop collection=3D"#thisBrowser#" item=3D"thisProperty">
>
>
> <cfif thisProperty is not "ParentAgent"
> AND NOT structkeyExists(stTempBrowser, thisProperty)>
> <cfif (structKeyExists(stTempBrowser, "name"))
> AND ((IsSimpleValue(thisBrowser[thisProperty]))
> AND (thisBrowser[thisProperty] is ""
> OR (thisBrowser[thisProperty] is not "name"
> AND thisBrowser[thisProperty] is not "browser")))>
> <cfset stTempBrowser[thisproperty] =3D =
>thisBrowser[thisProperty]>
>
> <cfelse>
> <cfif IsSimpleValue(thisBrowser[thisProperty])>
> <cfif thisBrowser[thisProperty] is not "">
> <cfset stTempBrowser[thisproperty] =3D =
>thisBrowser[thisProperty]>
> </cfif>
> </cfif>
> </cfif>
>=09
> =09
> </cfif>
>
> </cfloop>
>
>
> =09
> <cfelse>
>
> =09
> <cfset request.cfa.browser =3D structnew()>
> <cfset request.cfa.browser.userAgent =3D attributes.userAgent>
> <!--- overwrite parent attributes with child attributes --->
> <cfloop collection=3D"#thisBrowser#" item=3D"thisProperty">
> <cfif stTempBrowser[thisProperty] is not "">
> <cfset request.cfa.browser[thisProperty] =3D =
>thisBrowser[thisProperty]>
> </cfif>
> </cfloop> =09
> =09
> =09
> <!--- overwrite parent attributes with child attributes --->
> <cfloop collection=3D"#stTempBrowser#" item=3D"thisProperty">
> <cfif stTempBrowser[thisProperty] is not "">
> <cfset request.cfa.browser[thisProperty] =3D =
>stTempBrowser[thisProperty]>
> </cfif>
> </cfloop> =09
> =09
> <!--- This is a top level entry --->
> <cfset bTopLevel =3D "true">
>
> </cfif>
>
> <cfelse>
>
>
> <cfset myBrowser =3D structCopy(thisBrowser)>
> <!--- overwrite a copy of parent attributes with child attributes =
>--->
> <cfloop collection=3D"#stTempBrowser#" item=3D"thisProperty">
> <cfif stTempBrowser[thisProperty] is not "">
> <cfset myBrowser[thisProperty] =3D stTempBrowser[thisProperty]>
> </cfif>
> </cfloop>=09
> =09
> =09
> <!--- This is a top level entry --->
> <cfset request.cfa.browser =3D structnew()>
> <cfset request.cfa.browser =3D myBrowser>
> <cfset request.cfa.browser.userAgent =3D attributes.userAgent>
> <cfset bTopLevel =3D "true">
>
> </cfif>
>
> </cfloop>=09
> <cfelse>
> <cfset bNotFound =3D "TRUE">
> <cfset nCount =3D "1">
> <cfset parentAgent =3D "">
> <cfset oldAgent =3D thisAgent>
> <cfset thisAgent =3D trim(thisAgent)>
>
> <!--- BEGIN: Modified by -pt, conceptware ag, 22.03.2000 --->
> <cfset parentAgent =3D "Unknown">
> <cfloop condition=3D"#Evaluate('#bNotFound# AND (#nCount# LE =
>#StructCount(stBrowser)#)')#">
> <!--- END: Modified by -pt, conceptware ag, 22.03.2000 --->
> =20
> =09
> =20
> <cfif listlen(thisagent, " ") gt 1>
> <cfset revThisAgent =3D Reverse(thisAgent)>
> <cfset revThisAgent =3D ListDeleteAt(revThisAgent, 1, " ")>
> <cfset thisAgent =3D Reverse(revthisAgent)>
> =09
> <cfelse>
> <cfif listlen(thisAgent, ".") gt 1>
> <cfset thisAgent =3D listGetAt(thisAgent, 1, ".")>
> </cfif> =09
> =09
> </cfif> =09
>
> <cfif thisAgent does not contain "("
> AND listLen(thisAgent, "/") is 2>
> <cfset firstbit =3D listGetAt(thisAgent, 1, "/")>
> <cfset secondbit =3D listGetAt(thisAgent, 2, "/")>
> =09
> <cfif listlen(secondbit, ".") gt 1>
> =09
> <cfset thirdbit =3D listGetAt(secondbit, 2, ".")>
> <cfset secondbit =3D listGetAt(secondbit, 1, ".")>
> <cfif len(thirdbit) gt 1>
> <cfset thirdbit =3D left(thirdbit, 1)>
> </cfif>
> <cfelse>
> <cfset thirdbit =3D "">
> <cfset bNotFound =3D "FALSE">
> <cfset parentAgent =3D "">
> </cfif>
> <cfset thisAgent =3D firstbit & "/" & secondbit & "." & thirdbit>
> </cfif>
>
> <cfloop collection=3D"#server.cfa.browser#" item=3D"thisKey">
> =09
> <cfif thisKey CONTAINS thisAgent AND thisAgent is not "">
> <cfset bNotFound =3D "False">
> <cfset parentAgent =3D thisKey>
> <cfbreak>
> </cfif>
> </cfloop>
> =09
> =09
> <cfparam name=3D"revThisAgent" default=3D"">
> =09
> <cfif listLen(revThisAgent, " ") lt 1>
> <cfset bNotFound =3D "FALSE">
> <cfset parentAgent =3D "Unknown">
> </cfif>=09
> <cfset nCount =3D nCount + 1>
> </cfloop>
>
>
> =09
> <cfset thisAgent =3D oldAgent>
> =09
> <!--- get the major and minor versions from the user_agent string =
>--->
> <cfif listlen(thisAgent, ";") is 3>
> =09
> <cfset firstelement =3D listgetat(thisAgent, 2, ";")>
>
> <cfif NOT firstelement contains ".">
> <cfset firstelement =3D listgetat(thisAgent, 1, " ")>
> </cfif>
> =09
> <cfif firstelement contains "/">
> <cfset sep =3D "/">
> <cfelse>
> <cfset sep =3D " ">
> </cfif>
> =09
> <cfset browser =3D listgetat(firstelement, 1, sep)>
> <cfset fullversion =3D listgetat(firstelement, 2, sep)>
> <cfset majorversion =3D listgetat(fullversion, 1, ".")>
> <cfset minorversion =3D listgetat(fullversion, 2, ".")>
> <cfelseif listlen(thisAgent, ";") is 2>
> <cfset firstelement =3D listgetat(thisAgent, 1, " ")>
> =09
> <cfif firstelement contains "/">
> <cfset sep =3D "/">
> <cfelse>
> <cfset sep =3D " ">
> </cfif>
> =09
> <cfset browser =3D listgetat(firstelement, 1, sep)>
> <cfset fullversion =3D listgetat(firstelement, 2, sep)>
> <cfset majorversion =3D listgetat(fullversion, 1, ".")>
> <cfset minorversion =3D listgetat(fullversion, 2, ".")>
> <cfelse>
> =09
> <cfset browser =3D "">
> <cfset majorversion =3D "">
> <cfset minorversion =3D "">
> </cfif>
>
>
> =09
>
> =09
> =09
> =09
>
> <!--- Create an entry for this browser in the data store --->
> <cfif isdefined("parentAgent")>
> <!--- if the browser Agent string is empty, set it unknown --->
> <cfif thisAgent is "">
> <cfset thisAgent =3D "unknown">
> </cfif>
> =09
> <cfa_browserUpdate
> userAgent=3D"#thisAgent#"
> parentAgent=3D"#parentAgent#"
> browser=3D"#browser#"
> majorVersion=3D"#majorVersion#"
> minorVersion=3D"#minorVersion#"
> >
> <cfelse>
> <!--- if the browser Agent string is empty, set it unknown --->
> <cfif thisAgent is "">
> <cfset thisAgent =3D "unknown">
> </cfif>
> =09
> <cfa_browserUpdate
> userAgent=3D"#thisAgent#"
> browser=3D"#browser#"
> majorVersion=3D"#majorVersion#"
> minorVersion=3D"#minorVersion#"=09
> >=09
> </cfif>
>
> =09
> <cfset request.cfa.browser =3D structnew()>
> <cfset request.cfa.browser =3D duplicate(stBrowser[thisAgent])>
> <cfset request.cfa.browser.userAgent =3D thisAgent>
> =09
>
> =09
> </cfif>
>
>
>=09
></cfif>
>
>------_=_NextPart_000_01BFEC67.0E28402E
>Content-Type: application/octet-stream;
> name="cfa_browsercacherefresh.cfm"
>Content-Disposition: attachment;
> filename="cfa_browsercacherefresh.cfm"
>
><!---
>
> Template: cfa_browser.cfm
> Author:  Charles Teague
> Source Control: $Header:
/systemfiles/customtags/system/tier0/browser/cfa_browsercacherefresh.cfm 6
7/12/00 8:57p Cteague $
>
> Description:
>
> This tag refreshes the tempest browser cache.  This is necessary when
browser definitions are updated!
>
> Usage:
>
> <cfa_browserCacheRefresh>
>
> Attributes: none
> Parent tags: none
> Children tags: none
>
>--->
>
>
><cfset browserfilePath = server.cfa.information.programpath &
"/database/browser.wddx">
>
><!--- attempt to read the file: if it fails create empty server scope --->
><cftry>
> <cffile action="READ" file="#browserfilePath#" variable="wstBrowser">
> <cfwddx action="wddx2cfml" input="#wstBrowser#" output="stBrowser">
>
><cfcatch type="any">
> <!--- create the empty struct, this should appear in the error log --->
> <cflock timeout="5" throwontimeout="No" name="cfa_browser">
> <cfset server.cfa.browser = structnew()>
> </cflock>
> <cfset stBrowser = structNew()>
></cfcatch>
>
></cftry>
>
>
><cflock timeout="5" throwontimeout="No" name="cfa_browser">
> <cfif NOT isdefined("server.cfa")>
> <cfset server.cfa = structnew()>
> </cfif>
>
> <cfset server.cfa.browser  = structnew()>
> <cfset server.cfa.browser =  stBrowser>
></cflock>
>
>
><!--- If there is an empty user agent, purge it! --->
><cfif structkeyExists(stBrowser, "")>
> <cfa_browserDelete
> userAgent="">
></cfif>
>
>
>
>------_=_NextPart_000_01BFEC67.0E28402E--
>---------------------------------------------------------------------------
---
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
>


------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to