Bug #43651 --> can't read news without crashing. Implement GetContentType for nntp protocol.

r=sspitzer
This commit is contained in:
mscott%netscape.com 2000-06-24 01:17:02 +00:00
Родитель c97e05db7a
Коммит 01eee688b7
2 изменённых файлов: 36 добавлений и 26 удалений

Просмотреть файл

@ -5016,6 +5016,16 @@ NS_IMETHODIMP nsNNTPProtocol::GetContentType(char * *aContentType)
{
if (!aContentType) return NS_ERROR_NULL_POINTER;
// if we've been set with a content type, then return it....
// this happens when we go through libmime now as it sets our new content type
if (!m_ContentType.IsEmpty())
{
*aContentType = m_ContentType.ToNewCString();
return NS_OK;
}
// otherwise do what we did before...
if ((const char *)m_currentGroup && nsCRT::strlen((const char *)m_currentGroup)) {
// if it is an article url, it has a @ or %40 in it.
if (PL_strchr((const char *)m_currentGroup,'@') || PL_strstr((const char *)m_currentGroup,"%40")) {