fixes bug 146074 "Proxy-authorization not on all requests after authentication"

r=rjesup@wgate.com sr=rpotts@netscape.com
This commit is contained in:
darin%netscape.com 2002-05-22 03:26:21 +00:00
Родитель 98865b4fee
Коммит ad53403375
1 изменённых файлов: 7 добавлений и 4 удалений

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

@ -281,14 +281,17 @@ nsHttpAuthNode::GetAuthEntryForPath(const char *path,
// directory of an existing entry.
for (PRInt32 i=0; i<mList.Count(); ++i) {
nsHttpAuthEntry *entry = (nsHttpAuthEntry *) mList[i];
// path's can be NULL
if (!path || !entry->Path()) {
if (path == entry->Path()) {
const char *entryPath = entry->Path();
// path's can be empty (even NULL)
if (!path || !*path) {
if (!entryPath || !*entryPath) {
*result = entry;
break;
}
}
else if (!nsCRT::strncmp(path, entry->Path(), (unsigned int)strlen(entry->Path()))) {
else if (!entryPath || !*entryPath)
continue;
else if (!nsCRT::strncmp(path, entryPath, (unsigned int)strlen(entryPath))) {
*result = entry;
break;
}