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

This commit is contained in:
Tobie Langel 2007-12-29 11:09:43 +00:00
parent 5a37860ffb
commit f0d54a48bd
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,7 @@
*SVN*
* Ensure Ajax.Response#getHeader returns null for missing headers. [Tobie Langel]
* Ensure $A creates an empty array when its argument's length is undefined. Closes #10574. [henryju, Tobie Langel]
* Fix incorrect variable declaration in Event.fire. Closes #10329. [rubley]

View File

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