diff --git a/netwerk/protocol/ftp/nsFTPChannel.cpp b/netwerk/protocol/ftp/nsFTPChannel.cpp index e3de9ccb69ef..a4a2019f592b 100644 --- a/netwerk/protocol/ftp/nsFTPChannel.cpp +++ b/netwerk/protocol/ftp/nsFTPChannel.cpp @@ -6,7 +6,6 @@ #include "nsFTPChannel.h" #include "nsFtpConnectionThread.h" // defines nsFtpState -#include "nsMimeTypes.h" #include "nsThreadUtils.h" #include "mozilla/Attributes.h" @@ -92,7 +91,6 @@ nsresult nsFtpChannel::OpenContentStream(bool async, nsIInputStream** result, nsIChannel** channel) { if (!async) return NS_ERROR_NOT_IMPLEMENTED; - SetContentType(NS_LITERAL_CSTRING(APPLICATION_OCTET_STREAM)); RefPtr state = new nsFtpState(); nsresult rv = state->Init(this); diff --git a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp index e421b509c322..f8dbc81d93dd 100644 --- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp +++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp @@ -1101,6 +1101,8 @@ nsFtpState::R_retr() { } if (mResponseCode / 100 == 1) { + mChannel->SetContentType(NS_LITERAL_CSTRING(APPLICATION_OCTET_STREAM)); + Telemetry::ScalarAdd( Telemetry::ScalarID::NETWORKING_FTP_OPENED_CHANNELS_FILES, 1);