diff --git a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp
index a8e7ea330690..2ed500431a86 100644
--- a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp
+++ b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp
@@ -702,7 +702,7 @@ nsXMLHttpRequest::GetResponseHeader(const nsACString& header,
 
   if (rv == NS_ERROR_NOT_AVAILABLE) {
     // Means no header
-    SetDomStringToNull(_retval);
+    _retval.SetIsVoid(PR_TRUE);
     rv = NS_OK;
   }