• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

GetHttpRequestData missing "If-Modified-Since" and "If-None-Match"

New Here ,
Sep 17, 2009 Sep 17, 2009

Copy link to clipboard

Copied

I'm using CF8 on IIS6/Win2003 Server.

In my cfm I have:

<cfset reqheaders=GetHttpRequestData().headers>
<cfdump var="#reqheaders#">

...which gives:

struct
Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encodinggzip,deflate
Accept-Languageen-us,en;q=0.5
Cache-Controlmax-age=0
Connectionkeep-alive
CookieCFID=[removed]; CFTOKEN=[removed]
Host[my test server]
Keep-Alive300
User-AgentMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

But if I look at the actual headers being sent from my browser (using Firefox LiveHTTP add-on), it shows I am sending "If-Modified-Since" and "If-None-Match" headers.

GET /path/to/cfmfile.cfm HTTP/1.1
Host: [removed]
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: CFID=[removed]; CFTOKEN=[removed];
If-Modified-Since: Fri, 18 Sep 2009 01:18:19 GMT
If-None-Match: ""0134E50193C69AD753656B0513FCB28C""

Cache-Control: max-age=0

Is there some reason IIS would "steal" those headers before handing over control to ColdFusion?  Or does GetHttpRequestData sometimes "miss" headers?  Other ideas?  Is there any other way I can get at the raw HTTP request from within ColdFusion?

I'm at a loss.  Others have used the same process and no one seems to have this issue.

(see: http://www.petefreitag.com/item/235.cfm or http://admin.mxblogspace.journurl.com/?mode=article&entry=1853 for examples)

I've tried accessing the page using Internet Explorer instead.  It also is not showing those headers, but I have not sniffed IE's actual headers being sent so I can't be sure those headers are included (but I think they are, since IE implements conditional GET).

TOPICS
Advanced techniques

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 18, 2009 Sep 18, 2009

Copy link to clipboard

Copied

LATEST

Found out the answer.  IIS 6 does in fact steal "If-Modified-Since" and "If-None-Match" headers, but only on custom 404 redirects.  That's actually what I'm doing here (that'll teach me not to put details in a question when I think they're irrelevant -- actually I just forgot).

Here's two discussions on the issue (they're using ASP, but apparently it's the same for ColdFusion):

http://www.eggheadcafe.com/conversation.aspx?messageid=32839787&threadid=32839787

http://www.webmasterworld.com/microsoft_asp_net/3935439.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation