Hi,
What you've quoted here:
> Access-Control-Request-Headers=remote_user,x-prototype-version,x-
...isn't a request header. It looks like a response header from a
server that accepts CORS[1] requests and (for its own reasons) decided
to make your request headers all lowercase.
I just tried your code with Prototype 1.7 (http://jsbin.com/ikere3),
and the actual *request* header sent (according to Chrome, and
separately according to Firebug), was indeed REMOTE_USER with the
value I gave ("foo", in my case).
[1] http://www.w3.org/TR/access-control/
HTH,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com
On Feb 23, 3:22 pm, RudyWI wrote:
> Hi,
>
> I'am trying to use Ajax.Request to send a GET request with specific
> values in header part.
> I use the following code :
>
> function sendMyRequest(url, user) {
> var myAjax = new Ajax.Request(url, {
> method: 'get',
> requestHeaders: { REMOTE_USER:user },
> onSuccess: function() { alert("OK"); },
> onFailure: function() { alert("KO"); }
> });
>
> }
>
> After I invoked this function, the request header sent is :
>
> Host=*
> ...
> Access-Control-Request-Method=GET
> Access-Control-Request-Headers=remote_user,x-prototype-version,x-
> requested-with
>
> So I don't have a valid field for "REMOTE_USER", as defined in my
> function.
> I want a request Header similar to :
>
> Host=*
> ...
> REMOTE_USER=
>
> How to do it ?
>
> Thanks
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.