16256, r=gagan. the nsinputstreamchannel was lowercasing the entire contenttype. we don't want to lower case the contenttype attribs

This commit is contained in:
valeski%netscape.com 1999-11-11 00:37:18 +00:00
Родитель dd8ceebaee
Коммит 405d84eeb1
1 изменённых файлов: 12 добавлений и 5 удалений

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

@ -68,11 +68,18 @@ nsInputStreamChannel::Init(nsIURI* uri, const char* contentType,
mURI = uri;
mLoadGroup = group;
mContentLength = contentLength;
nsCAutoString cType(contentType);
cType.ToLowerCase();
mContentType = cType.ToNewCString();
if (mContentType == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
if (contentType) {
mContentType = nsCRT::strdup(contentType);
const char *constContentType = mContentType;
if (!constContentType) return NS_ERROR_OUT_OF_MEMORY;
char* semicolon = PL_strchr(constContentType, ';');
CBufDescriptor cbd(constContentType,
PR_TRUE,
semicolon ? (semicolon-constContentType) + 1: PL_strlen(constContentType), // capacity
semicolon ? (semicolon-constContentType) : PL_strlen(constContentType));
nsCAutoString(cbd).ToLowerCase();
}
mInputStream = in;
return NS_OK;
}