зеркало из https://github.com/mozilla/pjs.git
bustage fix for standalone, not part of build
This commit is contained in:
Родитель
0bff0a2feb
Коммит
3fe9fe7b88
|
@ -44,8 +44,8 @@
|
||||||
#ifdef TX_EXE
|
#ifdef TX_EXE
|
||||||
//- Constants -/
|
//- Constants -/
|
||||||
|
|
||||||
const String URIUtils::HTTP_PROTOCOL = "http";
|
const String URIUtils::HTTP_PROTOCOL("http");
|
||||||
const String URIUtils::FILE_PROTOCOL = "file";
|
const String URIUtils::FILE_PROTOCOL("file");
|
||||||
const char URIUtils::HREF_PATH_SEP = '/';
|
const char URIUtils::HREF_PATH_SEP = '/';
|
||||||
const char URIUtils::DEVICE_SEP = '|';
|
const char URIUtils::DEVICE_SEP = '|';
|
||||||
const char URIUtils::PORT_SEP = ':';
|
const char URIUtils::PORT_SEP = ':';
|
||||||
|
@ -76,9 +76,9 @@ istream* URIUtils::getInputStream
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Try local files
|
// Try local files
|
||||||
char* fchars = new char[href.length()+1];
|
char* fchars = href.toCharArray();
|
||||||
inStream = new ifstream(href.toCharArray(fchars), ios::in);
|
inStream = new ifstream(fchars, ios::in);
|
||||||
delete fchars;
|
delete [] fchars;
|
||||||
}
|
}
|
||||||
delete uri;
|
delete uri;
|
||||||
|
|
||||||
|
@ -170,12 +170,12 @@ void URIUtils::resolveHref(const String& href, const String& base,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Try local files
|
// Try local files
|
||||||
char* xHrefChars = new char[xHref.length()+1];
|
char* xHrefChars = xHref.toCharArray();
|
||||||
ifstream inFile(xHref.toCharArray(xHrefChars), ios::in);
|
ifstream inFile(xHrefChars, ios::in);
|
||||||
if ( inFile ) dest.append(xHref);
|
if ( inFile ) dest.append(xHref);
|
||||||
else dest.append(href);
|
else dest.append(href);
|
||||||
inFile.close();
|
inFile.close();
|
||||||
delete xHrefChars;
|
delete [] xHrefChars;
|
||||||
}
|
}
|
||||||
delete uri;
|
delete uri;
|
||||||
delete newUri;
|
delete newUri;
|
||||||
|
@ -208,9 +208,9 @@ istream* URIUtils::openStream(ParsedURI* uri) {
|
||||||
|
|
||||||
istream* inStream = 0;
|
istream* inStream = 0;
|
||||||
if ( FILE_PROTOCOL.isEqual(uri->protocol) ) {
|
if ( FILE_PROTOCOL.isEqual(uri->protocol) ) {
|
||||||
char* fchars = new char[uri->path.length()+1];
|
char* fchars = uri->path.toCharArray();
|
||||||
ifstream* inFile = new ifstream(uri->path.toCharArray(fchars), ios::in);
|
ifstream* inFile = new ifstream(fchars, ios::in);
|
||||||
delete fchars;
|
delete [] fchars;
|
||||||
inStream = inFile;
|
inStream = inFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче