dylan at dylanwolf.com
dylan at dylanwolf.com
Mon Jul 21 14:21:39 EDT 2008
Sorry if this is a repeat; I tried to send email earlier without actually being subscribed and didn't see it on the archive. Don't know if anyone else has run across this, but I've been getting "501 Method Not Implemented" when making AJAX calls on my mod_python site. This has mainly happened when using Firefox 3 or the newest version of prototype (JavaScript library). I narrowed it down to the Content-Type of the request containing the charset. For example, "Content-type: application/x-www-form-urlencoded; charset=utf-8" rather than just "Content-type: application/x-www-form-urlencoded." I'm running mod_python 3.1.4 (on OpenHosting, if that helps explain my setup). I was able to fix the problem by changing line 112 in mod_python/util.py from: if ctype == "application/x-www-form-urlencoded": to if ctype.startswith("application/x-www-form-urlencoded"): Has this been already fixed in a later version of mod_python? If not, I figured it might be a good idea to post my fix.
|