mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:52:26 +02:00
Merge pull request #4450 from birarda/master
some & squishes missed in review, metaverse user-agent fix
This commit is contained in:
commit
d6bf0f3bec
3 changed files with 4 additions and 6 deletions
|
@ -47,6 +47,6 @@ bool DataWebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkReques
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DataWebPage::userAgentForUrl(const QUrl & url) const {
|
QString DataWebPage::userAgentForUrl(const QUrl& url) const {
|
||||||
return INTERFACE_USER_AGENT;
|
return HIGH_FIDELITY_USER_AGENT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,15 +14,13 @@
|
||||||
|
|
||||||
#include <qwebpage.h>
|
#include <qwebpage.h>
|
||||||
|
|
||||||
const QString INTERFACE_USER_AGENT = "HighFidelityInterface/1.0";
|
|
||||||
|
|
||||||
class DataWebPage : public QWebPage {
|
class DataWebPage : public QWebPage {
|
||||||
public:
|
public:
|
||||||
DataWebPage(QObject* parent = 0);
|
DataWebPage(QObject* parent = 0);
|
||||||
protected:
|
protected:
|
||||||
void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID);
|
void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID);
|
||||||
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type);
|
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type);
|
||||||
virtual QString userAgentForUrl(const QUrl & url) const;
|
virtual QString userAgentForUrl(const QUrl& url) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_DataWebPage_h
|
#endif // hifi_DataWebPage_h
|
||||||
|
|
|
@ -68,7 +68,7 @@ static const quint64 USECS_PER_SECOND = USECS_PER_MSEC * MSECS_PER_SECOND;
|
||||||
const int BITS_IN_BYTE = 8;
|
const int BITS_IN_BYTE = 8;
|
||||||
|
|
||||||
// Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers.
|
// Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers.
|
||||||
const QByteArray HIGH_FIDELITY_USER_AGENT = "Mozilla/5.0 (HighFidelity)";
|
const QByteArray HIGH_FIDELITY_USER_AGENT = "Mozilla/5.0 (HighFidelityInterface)";
|
||||||
|
|
||||||
quint64 usecTimestampNow(bool wantDebug = false);
|
quint64 usecTimestampNow(bool wantDebug = false);
|
||||||
void usecTimestampNowForceClockSkew(int clockSkew);
|
void usecTimestampNowForceClockSkew(int clockSkew);
|
||||||
|
|
Loading…
Reference in a new issue