summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-08-11 11:50:37 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-08-11 11:50:37 (GMT)
commitc6ed32dc7e9c8a566f376d1baa7e616a1019f9af (patch)
tree95ce43172963aa266630d8836ccb6b23dde78991 /src/network
parent9986c3f0c0681c7ea8bc8e5cfea5662880db6654 (diff)
parent5fa15620d09df1164cc28aa9b1e646a61f87e909 (diff)
downloadQt-c6ed32dc7e9c8a566f376d1baa7e616a1019f9af.zip
Qt-c6ed32dc7e9c8a566f376d1baa7e616a1019f9af.tar.gz
Qt-c6ed32dc7e9c8a566f376d1baa7e616a1019f9af.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkrequest.cpp43
-rw-r--r--src/network/kernel/qhostinfo.cpp2
-rw-r--r--src/network/socket/qabstractsocket.cpp2
-rw-r--r--src/network/socket/qlocalsocket_win.cpp2
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp7
7 files changed, 26 insertions, 34 deletions
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index fa592c2..38cae8b 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -105,7 +105,8 @@ QT_BEGIN_NAMESPACE
/*!
\enum QNetworkRequest::Attribute
-
+ \since 4.7
+
Attribute codes for the QNetworkRequest and QNetworkReply.
Attributes are extra meta-data that are used to control the
@@ -186,34 +187,28 @@ QT_BEGIN_NAMESPACE
\value CustomVerbAttribute
Requests only, type: QVariant::ByteArray
- Holds the value for the custom HTTP verb to send (destined for usage
- of other verbs than GET, POST, PUT and DELETE). This verb is set
- when calling QNetworkAccessManager::sendCustomRequest().
+ Holds the value for the custom HTTP verb to send (destined for usage
+ of other verbs than GET, POST, PUT and DELETE). This verb is set
+ when calling QNetworkAccessManager::sendCustomRequest().
\value CookieLoadControlAttribute
- Requests only, type: QVariant::Int (default: QNetworkRequest::Automatic)
- Indicates whether to send 'Cookie' headers in the request.
-
- This attribute is set to false by QtWebKit when creating a cross-origin
- XMLHttpRequest where withCredentials has not been set explicitly to true by the
- Javascript that created the request.
-
- See http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag for more information.
-
- \since 4.7
+ Requests only, type: QVariant::Int (default:
+ QNetworkRequest::Automatic) Indicates whether to send 'Cookie'
+ headers in the request. This attribute is set to false by
+ QtWebKit when creating a cross-origin XMLHttpRequest where
+ withCredentials has not been set explicitly to true by the
+ Javascript that created the request. See
+ \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag}
+ {here} for more information.
\value CookieSaveControlAttribute
Requests only, type: QVariant::Int (default: QNetworkRequest::Automatic)
Indicates whether to save 'Cookie' headers received from the server in reply
to the request.
-
This attribute is set to false by QtWebKit when creating a cross-origin
XMLHttpRequest where withCredentials has not been set explicitly to true by the
Javascript that created the request.
-
- See http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag for more information.
-
- \since 4.7
+ See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag} {here} for more information.
\value AuthenticationReuseAttribute
Requests only, type: QVariant::Int (default: QNetworkRequest::Automatic)
@@ -221,22 +216,14 @@ QT_BEGIN_NAMESPACE
if available. If this is set to QNetworkRequest::Manual and the authentication
mechanism is 'Basic' or 'Digest', Qt will not send an an 'Authorization' HTTP
header with any cached credentials it may have for the request's URL.
-
This attribute is set to QNetworkRequest::Manual by QtWebKit when creating a cross-origin
XMLHttpRequest where withCredentials has not been set explicitly to true by the
Javascript that created the request.
-
- See http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag for more information.
-
- \since 4.7
+ See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag} {here} for more information.
\omitvalue MaximumDownloadBufferSizeAttribute
- \since 4.7
- \internal
\omitvalue DownloadBufferAttribute
- \since 4.7
- \internal
\value User
Special type. Additional information can be passed in
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 8ae1305..348b0d2 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -647,7 +647,7 @@ void QHostInfoLookupManager::lookupFinished(QHostInfoRunnable *r)
work();
}
-// This function returns immediatly when we had a result in the cache, else it will later emit a signal
+// This function returns immediately when we had a result in the cache, else it will later emit a signal
QHostInfo qt_qhostinfo_lookup(const QString &name, QObject *receiver, const char *member, bool *valid, int *id)
{
*valid = false;
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index b604e89..505db71 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1380,7 +1380,7 @@ void QAbstractSocket::connectToHostImplementation(const QString &hostName, quint
#endif
} else {
if (d->threadData->eventDispatcher) {
- // this internal API for QHostInfo either immediatly gives us the desired
+ // this internal API for QHostInfo either immediately gives us the desired
// QHostInfo from cache or later calls the _q_startConnecting slot.
bool immediateResultValid = false;
QHostInfo hostInfo = qt_qhostinfo_lookup(hostName,
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 4907f2c..1e0bced 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -306,7 +306,7 @@ void QLocalSocketPrivate::startAsyncRead()
/*!
\internal
Sets the correct size of the read buffer after a read operation.
- Returns false, if an error occured or the connection dropped.
+ Returns false, if an error occurred or the connection dropped.
*/
bool QLocalSocketPrivate::completeAsyncRead()
{
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index f91ce5f..fe28863 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -562,7 +562,7 @@ int QNativeSocketEnginePrivate::nativeAccept()
#else
int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0);
#endif
- //check if we have vaild descriptor at all
+ //check if we have valid descriptor at all
if(acceptedDescriptor > 0) {
// Ensure that the socket is closed on exec*()
::fcntl(acceptedDescriptor, F_SETFD, FD_CLOEXEC);
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index f73068e..91265f3 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -210,7 +210,7 @@
valid. On failure, QSslSocket will emit the QSslSocket::sslErrors()
signal. This mode is the default for clients.
- \value AutoVerifyPeer QSslSocket will automaticaly use QueryPeer for
+ \value AutoVerifyPeer QSslSocket will automatically use QueryPeer for
server sockets and VerifyPeer for client sockets.
\sa QSslSocket::peerVerifyMode()
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index b4d030c..94b1568 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -750,7 +750,7 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
ptrCertCloseStore(hSystemStore, 0);
}
}
-#elif defined(Q_OS_UNIX)
+#elif defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/var/ssl/certs/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // AIX
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/local/ssl/certs/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // Solaris
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/opt/openssl/certs/*.pem"), QSsl::Pem, QRegExp::Wildcard)); // HP-UX
@@ -1288,6 +1288,11 @@ bool QSslSocketBackendPrivate::isMatchingHostname(const QString &cn, const QStri
if (hostname.midRef(hostname.indexOf(QLatin1Char('.'))) != cn.midRef(firstCnDot))
return false;
+ // Check if the hostname is an IP address, if so then wildcards are not allowed
+ QHostAddress addr(hostname);
+ if (!addr.isNull())
+ return false;
+
// Ok, I guess this was a wildcard CN and the hostname matches.
return true;
}