First of all, I wanted to post this under a much more defined category, but this is as relative as I could find.
I have this form that when submitted sometimes automatically redirects to 404. This form has only 2 fields, a title and the article body. The form defaults to application/x-www-form-urlencoded. The log below is taken directly from Live HTTP Headers.
POST /article-page HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:184.108.40.206) Gecko/20110920 Firefox/3.6.23 ( .NET CLR 3.5.30729)
HTTP/1.1 302 Found
Date: Tue, 08 Nov 2011 12:42:23 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/220.127.116.1135 PHP/5.2.14
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
As seen above, the page sends to itself, then is suppose to check if the method was post, the usual stuff. But then the http response is a notFound page. Clearly the web server did not even executed our index.php, but decided based on the request headers somehow that the response should be a 404.
Now I've done my own debugging, and played with the article I'm sending. I tried to append the article paragraph by paragraph and see on what paragraph the bug triggers. The form submits fine until a certain paragraph, at that point I said Bingo! I thought I isolated the problem and tried to submit the form using that paragraph alone, but then the form submitted. Which now puzzles me, why would apache accept it as it is, but if appended on the end of the original article, it goes nuts!
Anyone's got any idea? It's probably an htaccess thing, or a web server thing, but I just couldnt get this thing nailed. Any form of help is much appreciated!