Fix withCredentials on synchronous XHRs.

This commit is contained in:
Mayhem 2013-05-20 02:46:05 +02:00
parent 89a7bf5cbc
commit 388c8b9d1a
2 changed files with 9 additions and 2 deletions

View File

@ -46,7 +46,14 @@ $.ajax = (url, callbacks, opts={}) ->
r.setRequestHeader key, val
$.extend r, callbacks
$.extend r.upload, upCallbacks
r.withCredentials = cred
try
# Firefox throws an error if you try
# to set this on a synchronous XHR.
# Only cookies from the remote domain
# are used in a request withCredentials.
r.withCredentials = cred
catch err
# do nothing
r.send form
r
$.cache = do ->

View File

@ -131,7 +131,7 @@ Unread =
Unread.db.set
boardID: Unread.thread.board.ID
threadID: Unread.thread.ID
val: Unread.lastReadPost
val: Unread.lastReadPost
setLine: (force) ->
return unless d.hidden or force is true