php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34820 'HTTP_ACCEPT_ENCODING' not set in $_SERVER
Submitted: 2005-10-10 22:22 UTC Modified: 2005-10-12 01:14 UTC
From: AlReece45 at yahoo dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.4.0 OS: Windows XP Home SP1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: AlReece45 at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-10-10 22:22 UTC] AlReece45 at yahoo dot com
Description:
------------
While it was working before, the $_SERVER['HTTP_ACCEPT_ENCODING'] is not longer being set.

I'm using Apache 2 with the PHP Module.

Note this is not a problem of "Content-Encoding" being sent

Reproduce code:
---------------
<?php

var_export($_SERVER['HTTP_ACCEPT_ENCODING']);

?>

Expected result:
----------------
'gzip, deflate'

Actual result:
--------------
NULL

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-10 22:30 UTC] tony2001@php.net
>While it was working before
it was working before *what*?

And what your phpinfo() tells about it?
Or there is no Accept-Encoding too?
 [2005-10-10 22:38 UTC] AlReece45 at yahoo dot com
Sorry if this posts twice...

What I meant is that is was set before.
And phpinfo() does not it either. I checked both there and using the code: <?php var_export($_SERVER); ?> to check to see  if I was just using the wrong index or just a documentation bug. Nothing in the $_SERVER variable, or $GLOBALS (checked it too) has anything with gzip in it.

It isn't a browser problem b/c I checked by sending a request manually using telnet.
 [2005-10-10 22:47 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

>What I meant is that is was set before.
Once again: before what happened? 
Yes, I got that "before it stopped working", but I guess you did something as if it just magically disappeared - that's not PHP problem.
Btw, it works just fine here.

>It isn't a browser problem b/c I checked by sending a 
>request manually using telnet.
How exactly did you check it?
 [2005-10-10 23:17 UTC] AlReece45 at yahoo dot com
I copied what Firefox sent using LiveHTTPHeaders and sent it using telnet via the Command Prompt to request a script that outputed $_SERVER.

telnet
o localhost 80
GET /test.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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

I can give you the results if you want. I'll test the snapshot as soon as I can compile it (a few hours).

If its not a php problem, what would it be? I put outputed every variable in a seperate page from my scripts and it still wasn't showing up. And I believe it stopped working when I updated to v4.4.0
 [2005-10-10 23:26 UTC] tony2001@php.net
Please reopen the report only when you tried the latest snapshot.
And try with some other browser.
 [2005-10-12 01:09 UTC] AlReece45 at yahoo dot com
This seems to be a wierd problem only happening on my computer. I tested it on a server. I don't believe my computer is sending out any "Accept-Encoding" header at all. This is not needed anymore.
 [2005-10-12 01:14 UTC] tony2001@php.net
No bug -> bogus.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC