зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
6fa7427dd4
Коммит
62d24f34f6
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче