ColdFusion 9.0  -  Bug 3041696

Created on Tuesday, June 22, 2010

Login for more options

Title

Bug 83423:(Watson Migration Closure)Summary: getPageContext()

Description

Problem:

Summary: getPageContext().getResponse().setHeader() change in behaviour between CF8 & CF9In CF8, the code below yields one HTTP "expires" header:<cfset getPageContext().getResponse().setHeader("expires", javaCast("String", "#dateAdd(’s’, 10, now())#"))><cfset getPageContext().getResponse().setHeader("expires", javaCast("String", "#dateAdd(’n’, 10, now())#"))><cfset getPageContext().getResponse().setHeader("expires", javaCast("String", "#dateAdd(’h’, 10, now())#"))>And in CF9 it yields three.-- Adam
Method:

ksaini: repo case:
Run this code with jmeter and see Response header.

<cfheader name="foo" value="1">

<cfset getPageContext().getResponse().setHeader("expires", javaCast("String", "#dateAdd('s', 10, now())#"))>
<cfset getPageContext().getResponse().setHeader("expires", javaCast("String", "#dateAdd('n', 10, now())#"))>
<cfset getPageContext().getResponse().setHeader("expires", javaCast("String", "#dateAdd('h', 10, now())#"))>
<cfdump var="#getPageContext().getResponse()#">

<cfset response = getPageContext().getResponse()>
<cfif response.containsHeader("foo")>
yes
<cfelse>
no
</cfif>
<p>
<cfif response.containsHeader("expire")>
yes
<cfelse>
no
</cfif>

Result:

Test Configuration

06/22/2010

App Language(s) English
OS Language(s) English
Platform(s) Platforms All
Browser(s)

Notes (0)

Duplicate ID
Reported By Adam Cameron.

Status

State Closed
Status Deferred
Reason NotEnoughTime

Importance

Priority 1-Low
Frequency Unknown
Failure Type Unspecified
Product Area Language

Build

Found In Build 0000
Fixed In Build

Attachments (0)

No Files Attached

Votes (0)

Your session has expired! Click to login
Current form data will be preserved

Cancel