This commit is contained in:
Seth Alves 2018-03-21 16:18:31 -07:00
parent ae94ab3d67
commit 916ed3a0d4
2 changed files with 4 additions and 5 deletions

View file

@ -518,12 +518,11 @@ bool isDomainURL(QUrl url) {
if (url.scheme() == URL_SCHEME_HIFI) {
return true;
}
if (url.scheme() != URL_SCHEME_FILE
if (url.scheme() != URL_SCHEME_FILE) {
// TODO -- once Octree::readFromURL no-longer takes over the main event-loop, serverless-domain urls can
// be loaded over http(s)
// && url.scheme() != URL_SCHEME_HTTP &&
// url.scheme() != URL_SCHEME_HTTPS
) {
return false;
}
if (url.path().endsWith(".json", Qt::CaseInsensitive) ||

View file

@ -133,14 +133,14 @@ void AddressManager::storeCurrentAddress() {
auto url = currentAddress();
if (url.scheme() == URL_SCHEME_FILE ||
(url.scheme() == URL_SCHEME_HIFI && !url.host().isEmpty())) {
// TODO -- once Octree::readFromURL no-longer takes over the main event-loop, serverless-domain urls can
// be loaded over http(s)
// url.scheme() == URL_SCHEME_HTTP ||
// url.scheme() == URL_SCHEME_HTTPS ||
!url.host().isEmpty()) {
currentAddressHandle.set(url);
} else {
qCWarning(networking) << "Ignoring attempt to save current address with an empty host" << url;
qCWarning(networking) << "Ignoring attempt to save current address with an invalid url:" << url;
}
}
@ -307,7 +307,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
bool isPossiblePlaceName(QString possiblePlaceName) {
bool result { false };
int length = possiblePlaceName.length();
static const int MINIMUM_PLACENAME_LENGTH = 2;
static const int MINIMUM_PLACENAME_LENGTH = 1;
static const int MAXIMUM_PLACENAME_LENGTH = 64;
if (possiblePlaceName.toLower() != "localhost" &&
length >= MINIMUM_PLACENAME_LENGTH && length <= MAXIMUM_PLACENAME_LENGTH) {