I am working on a script for someone and several of the users of the script have been complaining about getting 406 errors or "page not found" errors which I believe to be actually 406 errors(IE has a generic message for servers whos error pages aren't a certain length).
The errors seem to always occur when POSTing a form but not all for forms just some of them and it seems to be different forms for each person.
From what I understand 406 errors are usually a problem with language or charset differences between server and client. I've been checking out the operation of the script on hosts where it doesn't work completely vs sites such as mine which have the script installed and working perfectly(in that respect at least). I've been using an HTTP sniffer and by all appearances the headers sent back and forth by client and server should cause no problems of this sort as far as I can tell. And the headers look pretty much the same on non-working vs working sites.
So I am baffled as to the cause.
What other things besides language and charset can cause the error? What are some possible solutions to 406 errors?
This is something new that seems to have popped up within the last few weeks, prior to that there were no reports and the number of reports seems to be growing. I can't figure out what I could have done though that would have caused it.
Any help would be greatly appreciated.
HTTP 406 Not Acceptable error
Moderator: General Moderators
-
jumpshotjonny
- Forum Newbie
- Posts: 5
- Joined: Tue Sep 21, 2004 9:48 pm
- Location: MD, USA
prob another sp2 issue.....
people are complaining like mad about tons of websites having error pages since they upgraded to sp2(usually on pages w/ a form that submits via post)
but this is the first time ive heard of 406 errors.
some things that seem to help with the other issues(and just maybe, yours too)
send this header
header('Cache-Control: private');
add a query string to the action of your form
<form method="post" action="foo.php?">
and make sure you send a header specifying the charset, or doit in the html meta tags
im just throwing out some suggestions here. they prob wont help for 406 errors...
to me, ie's behavior isnt always rational and ive honestly had better luck just trying weird <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> when trying to fix ie bugs.
what headers are actually sent on a non working site?
people are complaining like mad about tons of websites having error pages since they upgraded to sp2(usually on pages w/ a form that submits via post)
but this is the first time ive heard of 406 errors.
some things that seem to help with the other issues(and just maybe, yours too)
send this header
header('Cache-Control: private');
add a query string to the action of your form
<form method="post" action="foo.php?">
and make sure you send a header specifying the charset, or doit in the html meta tags
im just throwing out some suggestions here. they prob wont help for 406 errors...
to me, ie's behavior isnt always rational and ive honestly had better luck just trying weird <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> when trying to fix ie bugs.
what headers are actually sent on a non working site?
-
jumpshotjonny
- Forum Newbie
- Posts: 5
- Joined: Tue Sep 21, 2004 9:48 pm
- Location: MD, USA
Well, its not just IE, it Mozilla and Opera as well. Opera gives an error that the server has terminated the connection or something to that effect which I read meant a 406 error I believe and Mozilla often will just do nothing at all, no warning and the next page does not load.
As far as what headers were sent I cannot seem to find the file I had saved from the sniffer session but the headers I was paying specific attention to were the Accept and Accept-Language headers sent by the browser and the Content-Type, Content-Language and headers like it.
I was going to explictly set the content type headers though I'm not sure it'll do any good but hey it shouldn't hurt anything either so I guess I don't have much to lose.
As far as what headers were sent I cannot seem to find the file I had saved from the sniffer session but the headers I was paying specific attention to were the Accept and Accept-Language headers sent by the browser and the Content-Type, Content-Language and headers like it.
I was going to explictly set the content type headers though I'm not sure it'll do any good but hey it shouldn't hurt anything either so I guess I don't have much to lose.
to me it seems related to http://64.233.183.104/search?q=cache:o7 ... &inlang=en