fixes bug 276720 "HTTP 204/205 responses should not cause STATE_TRANSFERRING events to be synthesized" r=biesi sr=bz

This commit is contained in:
darin%meer.net 2005-02-12 00:40:46 +00:00
parent 4280841edf
commit 548e42a51f

View File

@ -242,9 +242,10 @@ NS_IMETHODIMP nsDocumentOpenInfo::OnStartRequest(nsIRequest *request, nsISupport
//
// Deal with "special" HTTP responses:
//
// - In the case of a 204 (No Content) or 205 (Reset Content) response, do not try to find a
// content handler. Just return. This causes the request to be
// ignored.
// - In the case of a 204 (No Content) or 205 (Reset Content) response, do
// not try to find a content handler. Return NS_BINDING_ABORTED to cancel
// the request. This has the effect of ensuring that the DocLoader does
// not try to interpret this as a real request.
//
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(request, &rv));
@ -263,7 +264,7 @@ NS_IMETHODIMP nsDocumentOpenInfo::OnStartRequest(nsIRequest *request, nsISupport
LOG((" HTTP response status: %d", responseCode));
if (204 == responseCode || 205 == responseCode) {
return NS_OK;
return NS_BINDING_ABORTED;
}
}