I''m just getting started with prototype.js...well, started is not
quite the word.
Let me rephrase. I''m just beginning to be frustrated and driven crazy
by prototype.js.
Trying to set up a session id, I developed a cgi responder on
my site which returns an id when requested.
My cgi responder specifies Content-Type: text/xml; charset="UTF-8"
when
it returns the response and when I use wgat on that responder I see...
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/xml]
Here is what the responder is sending right now.
--------content sent-----------
<?xml version="1.0" encoding="UTF-8"?>
<session>
<id>hi!there</id>
<key>unlock</key>
</session>
--------------------
I cannot see a problem in the served page, yet prototype throws an
exception ''Error 406 -- Not Acceptable''.
Here is the code I''m using to make the request:
var source = ''http://mysite.com/cgi-bin/feedit.cgi'';
var opt = {
asynchronous: false,
parameters: {p: ''st''},
onComplete: handleXMLFunc,
// now the errors
onException: function(e, x) { alert(''exception: ''+x);
throw(x) },
on404: function(t) {
alert(''Error 404: location
"''+t.statusText+''" not found.'');
},
onFailure: function(t) {
alert(''Error '' + t.status + '' -- '' +
t.statusText);
}
};
var myAjax = new Ajax.Request( source, opt );
Anyone see (or have theories about) what I''m doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
FourBrane
2007-Aug-08 22:14 UTC
Re: prototype.js throwing 406 - Not Acceptible on page access
On Aug 8, 2:50 pm, FourBrane <men...-b3/S5mRRSrhZroRs9YW3xA@public.gmane.org> wrote:> parameters: {p: ''st''},ANSWER FOUND! I had altered my code (shown above) to upload here, but the real parameter value I was using for testing was ''p=start''. ''START'' turns out to be a magic word that SecFilter is going to choke on. That makes sense as it is, actually, a magic word on most systems. When I changed the code to use param p=st (just like I''d said I was using), the 406 error went away. Even so, I guess this is a useful lesson for anyone when deciding what to use as submit values -- stay away from ''start'' and probably other things like ''kill'' or ''sudo'', etc. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---