Bug 888834 - Java sees no-explicit-codebase as . not baseURI. r=josh

This commit is contained in:
John Schoenick 2013-07-01 14:14:56 -07:00
Родитель 62a3b54ac9
Коммит fc33db660b
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -1459,12 +1459,15 @@ nsObjectLoadingContent::UpdateObjectParameters(bool aJavaURI)
}
if (isJava && hasCodebase && codebaseStr.IsEmpty()) {
// Java treats an empty codebase as the document codebase, but codebase=""
// as "/"
// Java treats codebase="" as "/"
codebaseStr.AssignLiteral("/");
// XXX(johns): This doesn't cover the case of "https:" which java would
// interpret as "https:///" but we interpret as this document's
// URI but with a changed scheme.
} else if (isJava && !hasCodebase) {
// Java expects a directory as the codebase, or else it will construct
// relative URIs incorrectly :(
codebaseStr.AssignLiteral(".");
}
if (!codebaseStr.IsEmpty()) {