Forum Moderators: open

Message Too Old, No Replies

W3C Strange Error

Premature end of chunked stream./500 EOF when chunk header expected

         

jcodemasters

8:59 pm on Sep 10, 2007 (gmt 0)

10+ Year Member



Hello,
I often check my website w3c validation..today when I checked my website w3c validation .. I got strange errors.

For css I got this error

I/O Error: Premature end of chunked stream.

For Html

I got the following unexpected response when trying to retrieve

500 EOF when chunk header expected

If you made recent changes to your domain name (DNS) configuration, you may also want to check that your domain records are correct, or ask your hosting company to do so.

I never changed any thing in my website for long time.. so why this error occurred suddenly?

Seems like W3C have changed validation rules..

tedster

1:05 am on Sep 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On the surface, the message is saying there's something wrong with the HTTP 1.1 data stream its receiving. Now, it could be something wrong on the W3C side and the error message is being triggered, well, in error. But there also could be something gone wrong on your server.

From research I just did, here's my rough understanding. HTTP 1.1 chunked streams are a way to send an undefined amount of data - that is, starting to send the response without needing to know how much you're going to send beforehand. A chunked stream is introduced by a head - "Transfer-Encoding: chunked" and followed by chunk after chunk of data until the end is reached. Then a final empty chunk is sent

"Chunked" is a type of transfer encoding by which the message body is transmitted to the client as chunks that are stamped with the size of the chunks (see section 14.40 of RFC 2068). With chunked transfer encoding, the client can make sure that it has received all of the data that the server sends.

Chunked transfer encoding is similar to MIME encoding in relation to Internet mail (see RFC 822). The specific differences between MIME encoding and chunked transfer encoding are discussed in section 19.4 of RFC 2068.

[support.microsoft.com...]

So your error message is saying that the data from the server looks messed up - in my layman's language. Here's a whole bunch more information from the Internet Engineering Task Force (IETF):
[tools.ietf.org...]

jcodemasters

1:28 am on Sep 11, 2007 (gmt 0)

10+ Year Member



First of all thanks tedster for your reply. I just copy the sample XHTML code from w3c page and put on my server.. all verification done successfully.. so there is no server issue.. however there could be something wrong with php..

the way php is transferring data could be the cause?

I have tried to compress output by using .htaccess code

AddType "text/javascript" .gz
AddEncoding gzip .gz
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{THE_REQUEST} ^(.*).js
RewriteCond %{SCRIPT_FILENAME}.gz -f
RewriteRule ^(.*)\.js $1.js.gz [L]

but this also couldn't help me.. I looked many times in my website code but couldn't found any error..

all I am clueless