问题
I'm making a web site that must conform to MobileOK.
When I run the validator, it receives a "406" error whenever it attempts to retrieve a jpeg or png file, but gif files are fine.
What I think is causing it is that the "Accept:" header sent by the MobileOK validator doesn't include "image/png" or "image/jpg", rather it only includes "image/jpeg" and "image/gif".
So, I stripped all of the png files out of the site and replaced them with gif and jpeg files, renaming any ".jpg" to ".jpeg". I also added in the IIS MIME configuration to map any .jpg, .jpeg file extensions to the "image/jpeg" MIME type.
However, the validator keeps encountering error 406.
How do I solve this? Is there a way to fix it, a way to work around it, or a way to fool it?
As far as I know, the server has a clean installation of Windows Server 2003 with no modifications.
In response to kroonwijk, I can't give you an actual excerpt as I've for now just converted everything to .gif, and I don't have a live copy of the problematic site. However, the MobileOK site gave me a "IMAGE_FOR_SPACING" failure (claiming I had a very small, transparent image present) whenever it was validating a page including a png or jpeg file, and a "MAIN_DOCUMENT" error (with the site code given as a IIS 406 error) when I targeted the image itself with the validator.
The IIS log simply logged the time, IP of the validator, and the code 406. I'm now suspecting that somewhere along the way the Accept: header got truncated before it actually got to the IIS server... how would I view the actual accept header as is arrives?
来源:https://stackoverflow.com/questions/7445034/error-406-with-iis-6