Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

sending authorized POST requests: msg#00004

Subject: sending authorized POST requests
Hello,

In the transport driver 'http.js' i want the save
function to work with authenticated HTTP.  I know
that the server sends back a '401 Unauthorized' after
(basically) these lines of code:

        this.p.open("POST",filename,true );
        var xmlstring = BX_getResultXML();
        calc = calculateMarkup(xmlstring, true);
        this.p.setRequestHeader('Content-Type', 'text/html');
        this.p.send(xmlstring, true);

Now the browser/javascript is supposed to resent the 
request with the correct 'Authorization' header.
Other GET and POST requests (not initiated from javascript)
work fine (before and after the failing one).

The server does sent the 401 Unauthorized completly ok.
If i *manually* set the Authorization header with 

    this.p.setRequestHeader('Authorization', 'Basic ...')

all works fine.  This is obviously not a proper solution.

1) How could i enforce that 'resending' works?

2) how could i - from javascript - access the Authentication
   information?  I guess for 'security' reasons i can't :-(

3) what other solution? 

thanks for any help (even for pointing me to a site which
likely has this information). 

regards,

    holger
-- 
bx-editor-dev mailing list
bx-editor-dev@xxxxxxxxxxxxxxxx
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev



<Prev in Thread] Current Thread [Next in Thread>