birbal Posted January 4, 2011 Share Posted January 4, 2011 when i try to access some page it is showing this error...can anyone say what does this error means?...i mean when does this error comes? Content Encoding ErrorThe page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. * Please contact the website owners to inform them Link to comment Share on other sites More sharing options...
justsomeguy Posted January 4, 2011 Share Posted January 4, 2011 I believe you get that error when the page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.The browser sends a header called accept, or accept-range, which tells it which types of content it can accept. The server is supposed to respond with something the browser can accept, but in this case it's not. An example would be a browser telling the server it can accept plain text or deflate content, and the server responds with a gzipped document. The browser didn't say it would accept gzip. Link to comment Share on other sites More sharing options...
birbal Posted January 4, 2011 Author Share Posted January 4, 2011 so how can i make sure that browser accept gziped doc (acording to your example)? Link to comment Share on other sites More sharing options...
justsomeguy Posted January 4, 2011 Share Posted January 4, 2011 Check the accept header, it's in the $_SERVER array. Link to comment Share on other sites More sharing options...
birbal Posted February 1, 2011 Author Share Posted February 1, 2011 bumping this topic..i am facing same kind of problem again..and cant get what is the reason..i was using gzip with output buffer...it was working well..untill i upload new edited files...after uploading some bunch of files it stop working and showing the error...and its showing gzip deflate in accept header..how to debug it?i am not sure what is the reason..so its hard to catch where and why this error is coming Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2011 Share Posted February 1, 2011 Use a tool like Fiddler2 or Firebug to look at the headers. You need to know the headers that the browser is sending, and the headers that the server is responding with. Link to comment Share on other sites More sharing options...
birbal Posted February 1, 2011 Author Share Posted February 1, 2011 Use a tool like Fiddler2 or Firebug to look at the headers. You need to know the headers that the browser is sending, and the headers that the server is responding with.i am using fidler...its accept encodin in response header is gzipand in request header accept encoding is gzip,deflatei guess it should be same..:/what i am missing? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2011 Share Posted February 1, 2011 If the server says it's responding with a gzip file, then try to decode it yourself and see if it decodes. Get the data it's responding with, save it as a .gz file, and try to decompress it. Link to comment Share on other sites More sharing options...
birbal Posted February 1, 2011 Author Share Posted February 1, 2011 it is saying ... the content could not be decompressedthe magic number in gzip header is not correct. make sure you are passing in gzip stream Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2011 Share Posted February 1, 2011 What do you have set up to do the compression? Link to comment Share on other sites More sharing options...
birbal Posted February 1, 2011 Author Share Posted February 1, 2011 it was ob_gzhandler.. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2011 Share Posted February 1, 2011 I don't know what to tell you, it sounds like it's not compressing the content correctly. Link to comment Share on other sites More sharing options...
birbal Posted February 1, 2011 Author Share Posted February 1, 2011 but it was doing before..if i remove the compression..it is working...but not with the gz_handler..as far i i am aware i did not change anything intentionaly that could cause it...i updated some files and its stoped working...i belive probably i did something wrong somewhere...but cant track it downwhen the compression can be failed? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 1, 2011 Share Posted February 1, 2011 Try saving the files with a different encoding and see if that makes a difference. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.