This commit is contained in:
Martin Rotter 2021-03-29 09:09:07 +02:00
parent b4d499291e
commit e7b1c4b6d9
4 changed files with 9 additions and 3 deletions

View File

@ -30,7 +30,7 @@
<url type="donation">https://martinrotter.github.io/donate/</url> <url type="donation">https://martinrotter.github.io/donate/</url>
<content_rating type="oars-1.1" /> <content_rating type="oars-1.1" />
<releases> <releases>
<release version="3.9.0" date="2021-03-23"/> <release version="3.9.0" date="2021-03-29"/>
</releases> </releases>
<content_rating type="oars-1.0"> <content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute> <content_attribute id="violence-cartoon">none</content_attribute>

View File

@ -30,8 +30,13 @@
#define URI_SCHEME_FEED_SHORT "feed:" #define URI_SCHEME_FEED_SHORT "feed:"
#define URI_SCHEME_FEED "feed://" #define URI_SCHEME_FEED "feed://"
#define URI_SCHEME_HTTP_SHORT "http:"
#define URI_SCHEME_HTTP "http://" #define URI_SCHEME_HTTP "http://"
#define URI_SCHEME_HTTPS_SHORT "https:"
#define URI_SCHEME_HTTPS "https://"
#define DEFAULT_LOCALE "en" #define DEFAULT_LOCALE "en"
#define NO_PARENT_CATEGORY -1 #define NO_PARENT_CATEGORY -1

View File

@ -149,7 +149,7 @@ void OAuthHttpHandler::answerClient(QTcpSocket* socket, const QUrl& url) {
void OAuthHttpHandler::readReceivedData(QTcpSocket* socket) { void OAuthHttpHandler::readReceivedData(QTcpSocket* socket) {
if (!m_connectedClients.contains(socket)) { if (!m_connectedClients.contains(socket)) {
m_connectedClients[socket].m_address = QSL("http://") + m_httpServer.serverAddress().toString(); m_connectedClients[socket].m_address = QSL(URI_SCHEME_HTTP) + m_httpServer.serverAddress().toString();
m_connectedClients[socket].m_port = m_httpServer.serverPort(); m_connectedClients[socket].m_port = m_httpServer.serverPort();
} }

View File

@ -283,7 +283,8 @@ QString StandardServiceRoot::processFeedUrl(const QString& feed_url) {
if (feed_url.startsWith(QL1S(URI_SCHEME_FEED_SHORT))) { if (feed_url.startsWith(QL1S(URI_SCHEME_FEED_SHORT))) {
QString without_feed_prefix = feed_url.mid(QSL(URI_SCHEME_FEED_SHORT).size()); QString without_feed_prefix = feed_url.mid(QSL(URI_SCHEME_FEED_SHORT).size());
if (without_feed_prefix.startsWith(QL1S("https:")) || without_feed_prefix.startsWith(QL1S("http:"))) { if (without_feed_prefix.startsWith(QL1S(URI_SCHEME_HTTPS_SHORT)) ||
without_feed_prefix.startsWith(QL1S(URI_SCHEME_HTTP_SHORT))) {
return without_feed_prefix; return without_feed_prefix;
} }
else { else {