prototype: Ensure Ajax.Response#getHeader returns null for missing headers in Opera.

This commit is contained in:
Tobie Langel 2007-12-30 10:59:23 +00:00
parent 143b13d069
commit c9a07576be
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,7 @@
*SVN*
* Ensure Ajax.Response#getHeader returns null for missing headers in Opera. [Tobie Langel]
* Allow WEBrick to simulate slow or dropped connections and to ease Ajax request inspection. [Tobie Langel]
* Ensure Ajax.Response#getHeader returns null for missing headers. [Tobie Langel]

View File

@ -209,8 +209,7 @@ Ajax.Request = Class.create(Ajax.Base, {
getHeader: function(name) {
try {
var header = this.transport.getResponseHeader(name);
return Object.isUndefined(header) ? null : header;
return this.transport.getResponseHeader(name) || null;
} catch (e) { return null }
},