javascript - Can xmlHttpRequest access the Authorization header in Firefox -


i may missing obvious... but

i trying enhance native subversion http access greasemonkey plugin. @ moment using cgi scripts run propfind etc. subverts security although work.

i have downloaded javascript dav client want http://debris.demon.nl/projects/davclient.js/. assuming can use user credentials supplied, should able extended subversion information using javascript correct security.

we run basic authentication on subversion server , not know how make xmlhttprequest in library inherit pre-existing browser authentication details. xmlhttprequest returns 401 although calling page authenticated , on same domain.

you can specify authorization header manually using .setrequestheader(header, value).

according the spec:

if user agent supports http authentication , authorization not in list of author request headers [set setrequestheader], should consider requests originating xmlhttprequest object part of protection space includes accessed uris , send authorization headers , handle 401 unauthorized requests appropriately.

this seems mean if user has supplied authentication credentials resource, xhr automatically use them.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -