Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] What's the deal with HTTP_ACCEPT? (Was: Wanna see my open source project?)
- Date: Mon, 18 Aug 2008 11:43:54 +0900
- From: Dave M G <dave@example.com>
- Subject: [tlug] What's the deal with HTTP_ACCEPT? (Was: Wanna see my open source project?)
- References: <48A15C6C.2010607@articlass.org> <20080814115716.e612ddc1.gstewart@bonivet.net> <30ce84360808140423j53b267bcrb31b23ad1ebb139b@mail.gmail.com> <48A41AB0.7070003@articlass.org> <20080814125818.3988d466.gstewart@bonivet.net> <48A43932.6090405@articlass.org> <87myjfgw0d.fsf@uwakimon.sk.tsukuba.ac.jp> <20080814181314.0dd71775.jep200404@columbus.rr.com> <48A4F183.2040507@articlass.org> <1218856462.3150.9.camel@localhost.localdomain> <30ce84360808170313r613e51c4gb17344b5308c6436@mail.gmail.com>
- User-agent: Thunderbird 2.0.0.16 (X11/20080724)
Ian, Kenneth,
Thank you for responding.
After a looooong and tedious debugging session, I finally narrowed down the problem to a single line of code that was causing all the problems.
That line is simply this:
$ac = strtolower($_SERVER['HTTP_ACCEPT']);
Long story short - some browsers don't send back a value for HTTP_ACCEPT, so it is not even empty, the entry doesn't even exist in the $_SERVER array. Since this variable is being looked at *before* the session starts, somehow the act of discovering it isn't there causes a session to get started, but not with the right data (probably a mostly empty $_SESSION array). From that point on, the mangled session causes everything to die horribly.
The solution is easy enough:
$acSet = isset( $_SERVER['HTTP_ACCEPT']); if ($acSet) { $ac = strtolower($_SERVER['HTTP_ACCEPT']); } else { $ac = ''; }
So now my sites are back up and running, and validating, and everything is working.
But I'm puzzled why this one entry in $_SERVER is so problematic. If it can't be found, why not simply return null or an empty string?
-- Dave M G http://www.tlug.jp/wiki/User:Dave_M_G
- Follow-Ups:
- Re: [tlug] What's the deal with HTTP_ACCEPT? (Was: Wanna see my open source project?)
- From: Edmund Edgar
- Re: [tlug] What's the deal with HTTP_ACCEPT? (Was: Wanna see my open source project?)
- From: Edward Middleton
- References:
- [tlug] Thunderbird RSS different from FireFox?
- From: Dave M G
- Re: [tlug] Thunderbird RSS different from FireFox?
- From: Godwin Stewart
- Re: [tlug] Thunderbird RSS different from FireFox?
- From: Ian Wells
- Re: [tlug] Thunderbird RSS different from FireFox?
- From: Dave M G
- Re: [tlug] Thunderbird RSS different from FireFox?
- From: Godwin Stewart
- Re: [tlug] Thunderbird RSS different from FireFox?
- From: Dave M G
- Re: [tlug] Thunderbird RSS different from FireFox?
- From: Stephen J. Turnbull
- Sending Custom Headers (was Re: [tlug] Thunderbird RSS different from FireFox?)
- From: jep200404
- [tlug] Wanna see my open source project? (Was:Thunderbird RSS different from FireFox?)
- From: Dave M G
- Re: [tlug] Wanna see my open source project? (Was:Thunderbird RSS different from FireFox?)
- From: Kenneth M. Burling Jr.
- Re: [tlug] Wanna see my open source project? (Was:Thunderbird RSS different from FireFox?)
- From: Ian Wells
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Microsoft embarassment during the Beijing Olympics opening ceremony
- Next by Date: Re: [tlug] What's the deal with HTTP_ACCEPT? (Was: Wanna see my open source project?)
- Previous by thread: Re: [tlug] Wanna see my open source project? (Was:Thunderbird RSS different from FireFox?)
- Next by thread: Re: [tlug] What's the deal with HTTP_ACCEPT? (Was: Wanna see my open source project?)
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links