зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1734573) for causing failures on browser_net_brotli.js. CLOSED TREE
Backed out changeset 1b2194a0e1ec (bug 1734573) Backed out changeset 51a00e9f45a3 (bug 1734573)
This commit is contained in:
Родитель
7c6573e619
Коммит
7c13c79ea0
|
@ -44,10 +44,10 @@ add_task(async function() {
|
|||
HTTPS_CONTENT_TYPE_SJS + "?fmt=br",
|
||||
{
|
||||
status: 200,
|
||||
statusText: "OK",
|
||||
type: "json",
|
||||
fullMimeType: "text/json",
|
||||
transferred: L10N.getFormatStrWithNumbers("networkMenu.sizeB", 252),
|
||||
statusText: "Connected",
|
||||
type: "plain",
|
||||
fullMimeType: "text/plain",
|
||||
transferred: L10N.getFormatStrWithNumbers("networkMenu.sizeB", 60),
|
||||
size: L10N.getFormatStrWithNumbers("networkMenu.sizeB", 64),
|
||||
time: true,
|
||||
}
|
||||
|
|
|
@ -1330,8 +1330,7 @@ bool nsHttpTransaction::ShouldRestartOn0RttError(nsresult reason) {
|
|||
this, mEarlyDataWasAvailable, static_cast<uint32_t>(reason)));
|
||||
return StaticPrefs::network_http_early_data_disable_on_error() &&
|
||||
mEarlyDataWasAvailable &&
|
||||
(reason ==
|
||||
psm::GetXPCOMFromNSSError(SSL_ERROR_PROTOCOL_VERSION_ALERT));
|
||||
SecurityErrorToBeHandledByTransaction(reason);
|
||||
}
|
||||
|
||||
void nsHttpTransaction::Close(nsresult reason) {
|
||||
|
@ -2396,25 +2395,18 @@ nsresult nsHttpTransaction::ProcessData(char* buf, uint32_t count,
|
|||
if (count && bytesConsumed) memmove(buf, buf + bytesConsumed, count);
|
||||
|
||||
// report the completed response header
|
||||
if (mActivityDistributor && mResponseHead && mHaveAllHeaders) {
|
||||
auto reportResponseHeader = [&](uint32_t aSubType) {
|
||||
nsAutoCString completeResponseHeaders;
|
||||
mResponseHead->Flatten(completeResponseHeaders, false);
|
||||
completeResponseHeaders.AppendLiteral("\r\n");
|
||||
rv = mActivityDistributor->ObserveActivityWithArgs(
|
||||
HttpActivityArgs(mChannelId),
|
||||
NS_HTTP_ACTIVITY_TYPE_HTTP_TRANSACTION, aSubType, PR_Now(), 0,
|
||||
completeResponseHeaders);
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG3(("ObserveActivity failed (%08x)", static_cast<uint32_t>(rv)));
|
||||
}
|
||||
};
|
||||
|
||||
if (mConnection->IsProxyConnectInProgress()) {
|
||||
reportResponseHeader(NS_HTTP_ACTIVITY_SUBTYPE_PROXY_RESPONSE_HEADER);
|
||||
} else if (!mReportedResponseHeader) {
|
||||
mReportedResponseHeader = true;
|
||||
reportResponseHeader(NS_HTTP_ACTIVITY_SUBTYPE_RESPONSE_HEADER);
|
||||
if (mActivityDistributor && mResponseHead && mHaveAllHeaders &&
|
||||
!mReportedResponseHeader) {
|
||||
mReportedResponseHeader = true;
|
||||
nsAutoCString completeResponseHeaders;
|
||||
mResponseHead->Flatten(completeResponseHeaders, false);
|
||||
completeResponseHeaders.AppendLiteral("\r\n");
|
||||
rv = mActivityDistributor->ObserveActivityWithArgs(
|
||||
HttpActivityArgs(mChannelId), NS_HTTP_ACTIVITY_TYPE_HTTP_TRANSACTION,
|
||||
NS_HTTP_ACTIVITY_SUBTYPE_RESPONSE_HEADER, PR_Now(), 0,
|
||||
completeResponseHeaders);
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG3(("ObserveActivity failed (%08x)", static_cast<uint32_t>(rv)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,13 +97,12 @@ interface nsIHttpActivityObserver : nsISupports
|
|||
const unsigned long ACTIVITY_TYPE_SOCKET_TRANSPORT = 0x0001;
|
||||
const unsigned long ACTIVITY_TYPE_HTTP_TRANSACTION = 0x0002;
|
||||
|
||||
const unsigned long ACTIVITY_SUBTYPE_REQUEST_HEADER = 0x5001;
|
||||
const unsigned long ACTIVITY_SUBTYPE_REQUEST_BODY_SENT = 0x5002;
|
||||
const unsigned long ACTIVITY_SUBTYPE_RESPONSE_START = 0x5003;
|
||||
const unsigned long ACTIVITY_SUBTYPE_RESPONSE_HEADER = 0x5004;
|
||||
const unsigned long ACTIVITY_SUBTYPE_RESPONSE_COMPLETE = 0x5005;
|
||||
const unsigned long ACTIVITY_SUBTYPE_TRANSACTION_CLOSE = 0x5006;
|
||||
const unsigned long ACTIVITY_SUBTYPE_PROXY_RESPONSE_HEADER = 0x5007;
|
||||
const unsigned long ACTIVITY_SUBTYPE_REQUEST_HEADER = 0x5001;
|
||||
const unsigned long ACTIVITY_SUBTYPE_REQUEST_BODY_SENT = 0x5002;
|
||||
const unsigned long ACTIVITY_SUBTYPE_RESPONSE_START = 0x5003;
|
||||
const unsigned long ACTIVITY_SUBTYPE_RESPONSE_HEADER = 0x5004;
|
||||
const unsigned long ACTIVITY_SUBTYPE_RESPONSE_COMPLETE = 0x5005;
|
||||
const unsigned long ACTIVITY_SUBTYPE_TRANSACTION_CLOSE = 0x5006;
|
||||
|
||||
/**
|
||||
* When aActivityType is ACTIVITY_TYPE_SOCKET_TRANSPORT
|
||||
|
@ -146,8 +145,6 @@ interface nsIHttpActivityObserver : nsISupports
|
|||
nsIHttpActivityObserver::ACTIVITY_SUBTYPE_RESPONSE_COMPLETE
|
||||
#define NS_HTTP_ACTIVITY_SUBTYPE_TRANSACTION_CLOSE \
|
||||
nsIHttpActivityObserver::ACTIVITY_SUBTYPE_TRANSACTION_CLOSE
|
||||
#define NS_HTTP_ACTIVITY_SUBTYPE_PROXY_RESPONSE_HEADER \
|
||||
nsIHttpActivityObserver::ACTIVITY_SUBTYPE_PROXY_RESPONSE_HEADER
|
||||
|
||||
%}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче