mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Patching prototype.js connection closing to avoid JS errors (see pull request #106)
This commit is contained in:
parent
d0cbbab513
commit
e5e7511245
11
thirdparty/prototype/prototype.js
vendored
11
thirdparty/prototype/prototype.js
vendored
@ -778,12 +778,13 @@ Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
|
|||||||
requestHeaders.push('Content-type',
|
requestHeaders.push('Content-type',
|
||||||
'application/x-www-form-urlencoded; charset=utf-8');
|
'application/x-www-form-urlencoded; charset=utf-8');
|
||||||
|
|
||||||
/* Force "Connection: close" for Mozilla browsers to work around
|
/* Force "Connection: close" for older Mozilla browsers to work
|
||||||
* a bug where XMLHttpReqeuest sends an incorrect Content-length
|
* around a bug where XMLHttpRequest sends an incorrect
|
||||||
* header. See Mozilla Bugzilla #246651.
|
* Content-length header. See Mozilla Bugzilla #246651.
|
||||||
*/
|
*/
|
||||||
if (this.transport.overrideMimeType)
|
if (this.transport.overrideMimeType &&
|
||||||
requestHeaders.push('Connection', 'close');
|
(navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
|
||||||
|
headers['Connection'] = 'close';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.requestHeaders)
|
if (this.options.requestHeaders)
|
||||||
|
Loading…
Reference in New Issue
Block a user