mirror of https://github.com/kiwix/libkiwix.git
+ Fix deal with relative urls
This commit is contained in:
parent
005b75f7ab
commit
587b76bf6d
|
@ -375,8 +375,13 @@ namespace kiwix {
|
||||||
return this->getContentByEncodedUrl(url, content, contentLength, contentType);
|
return this->getContentByEncodedUrl(url, content, contentLength, contentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Reader::getContentByEncodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType, string &baseUrl) {
|
||||||
|
return this->getContentByDecodedUrl(kiwix::urlDecode(url), content, contentLength, contentType, baseUrl);
|
||||||
|
}
|
||||||
|
|
||||||
bool Reader::getContentByEncodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType) {
|
bool Reader::getContentByEncodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType) {
|
||||||
return this->getContentByDecodedUrl(kiwix::urlDecode(url), content, contentLength, contentType);
|
std::string stubRedirectUrl;
|
||||||
|
return this->getContentByEncodedUrl(kiwix::urlDecode(url), content, contentLength, contentType, stubRedirectUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Reader::getContentByDecodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType) {
|
bool Reader::getContentByDecodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType) {
|
||||||
|
|
|
@ -62,6 +62,7 @@ namespace kiwix {
|
||||||
bool getFavicon(string &content, string &mimeType);
|
bool getFavicon(string &content, string &mimeType);
|
||||||
bool getPageUrlFromTitle(const string &title, string &url);
|
bool getPageUrlFromTitle(const string &title, string &url);
|
||||||
bool getContentByUrl(const string &url, string &content, unsigned int &contentLength, string &contentType);
|
bool getContentByUrl(const string &url, string &content, unsigned int &contentLength, string &contentType);
|
||||||
|
bool getContentByEncodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType, string &baseUrl);
|
||||||
bool getContentByEncodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType);
|
bool getContentByEncodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType);
|
||||||
bool getContentByDecodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType, string &baseUrl);
|
bool getContentByDecodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType, string &baseUrl);
|
||||||
bool getContentByDecodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType);
|
bool getContentByDecodedUrl(const string &url, string &content, unsigned int &contentLength, string &contentType);
|
||||||
|
|
Loading…
Reference in New Issue