Accept HTTP Header


I have a problem with "Accept" header in http. I've writen http client, and when i set "Accept: image/png" I can read any file (like txt, html, etc...). I think i should be impossible if I set header "Accept" like above...

I tried to check how my Firefox behaves.... I wrote "about:config" and I set "network.http.accept.default" as "image/png"... and I can surf the net as usually.

Don't I understand meaning of this header? I think that I only can open files *.png.

Could anyone explain this?

(Sorry for my English)

Please help me.

As you suppose, setting Accept means that you can't accept others medias than these specified, and servers should return a 406 response code. It practice, servers don't implements correctly, and always send a response.

All details are available in RFC 2616