From 0955b41b295bd0dc3597cbc5c4e94677336f424d Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Sat, 13 Sep 2003 21:20:35 +0000 Subject: [PATCH] Bug 218645 string bundles: use setcontenttype after ::open r=bz sr=darin --- intl/strres/src/nsStringBundle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/intl/strres/src/nsStringBundle.cpp b/intl/strres/src/nsStringBundle.cpp index a271ed94c95d..65eb720bff5c 100644 --- a/intl/strres/src/nsStringBundle.cpp +++ b/intl/strres/src/nsStringBundle.cpp @@ -125,13 +125,13 @@ nsStringBundle::LoadProperties() rv = NS_NewChannel(getter_AddRefs(channel), uri); if (NS_FAILED(rv)) return rv; + // It's a string bundle. We expect a text/plain type, so set that as hint + channel->SetContentType(NS_LITERAL_CSTRING("text/plain")); + nsCOMPtr in; rv = channel->Open(getter_AddRefs(in)); if (NS_FAILED(rv)) return rv; - // It's a string bundle. We know what MIME type it is! - channel->SetContentType(NS_LITERAL_CSTRING("text/plain")); - NS_TIMELINE_MARK_FUNCTION("loading properties"); NS_ASSERTION(NS_SUCCEEDED(rv) && in, "Error in OpenBlockingStream");