Can I make AJAX work with HTTP authorization?
December 18, 2006 6:33 PM
Subscribe
Is it possible to make an AJAX request work with an HTTP authorization-protected server script?
I have a personal CGI script which is protected with a "require user" directive in the .htaccess file. I'm trying to add a little bit of AJAX to it, but it's not working. A look at the logs indicates that the requests from the XMLHttpRequest object are failing with a 401 ("Not authorized") error and aren't submitting a username.
Google searching wasn't very helpful; there are lots of sites about "http authorization" that also include the term "AJAX" but only as part of an ad or navigation feature. Is it possible to make AJAX requests send along the same authorization information as the browser, and if so, how?
posted by Godbert to computers & internet (5 comments total)
posted by null terminated at 6:37 PM on December 18, 2006