summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* QNativeSocketEngine: Set OS error strings on failed read()Markus Goetz2010-01-253-4/+7
| | | | Reviewed-by: thiago
* QNativeSocketEngine: Also handle unknown errors from socket engineMarkus Goetz2010-01-251-0/+5
| | | | | | Task-number: QTBUG-7316 Task-number: QTBUG-7317 Reviewed-by: thiago
* QFileNetworkReply: Use a QFileEngineMarkus Goetz2010-01-252-19/+38
| | | | | | Slight performance increase. Reviewed-by: Peter Hartmann
* QNativeSocketEngine_win: Don't mess with linger settingsMarkus Goetz2010-01-251-2/+4
| | | | Reviewed-by: thiago
* QSslSocket: Take better care on how we use the SSL buffersMarkus Goetz2010-01-211-3/+23
| | | | | | .. and breaking out of a loop where we should. Reviewed-by: thiago
* SSL Certificate: don't crash when the END CERTIFICATE line ends without CRLFThiago Macieira2010-01-211-4/+4
| | | | | | | | | | | If the file/data ends in the END CERTIFICATE line without a newline, the certificate is still valid. If it's followed by anything other than a newline, then it's no longer valid. Also add another test for the BEGIN CERTIFICATE ending without newline, to ensure we don't crash there either. Reviewed-By: Peter Hartmann
* QNAM HTTP: make it give some better error messages in case of socket failure.Thiago Macieira2010-01-213-5/+7
| | | | Reviewed-By: Peter Hartmann
* Avoid calling WSAGetLastError() so often in nativeWriteMarkus Goetz2010-01-201-3/+3
| | | | Reviewed-by: joao
* QNativeSocketEngine windows: Fix performance degredation in write()Markus Goetz2010-01-191-2/+11
| | | | | | | | We had an hack in the code that chunked writes. Try to avoid this since the hack is probably only needed for older windows versions. Task-number: QTBUG-7344 Reviewed-by: Peter Hartmann
* Enhance QFileNetworkReplyMarkus Goetz2010-01-184-65/+48
| | | | | | | | It is now considered as finished immediatly after creation to avoid an event loop spin. Had to change the auto tests a bit to account for the new behaviour. Reviewed-by: Peter Hartmann
* Fix QSslCertificate issuesMarkus Goetz2010-01-181-2/+12
| | | | | | | Thank you Matthew Cattell for the fix! Task-number: QTBUG-6466 Reviewed-by: joao
* network internals: fix uploading of dataPeter Hartmann2010-01-141-1/+1
| | | | Reviewed-by: Markus Goetz
* QSslSocket: Remove writeBuffer,readBuffer and use from QAbstractSocketMarkus Goetz2010-01-131-3/+0
| | | | | | | We're using the ones from our parent class instead of own instance. Reviewed-by: Thiago Reviewed-by: joao
* Fix an issue with HTTP headers like "private, max-age=300".Thiago Macieira2010-01-121-1/+1
| | | | | | | | | | | The parsing would ignore the fact that "private" ended at the comma and would instead try to get the continuation as the value. We have to check if equal < comma and it's not -1. Using unsigned comparisons does both things at once for us. Task-number: QTBUG-7060 Reviewed-by: Peter Hartmann
* QNAM HTTP Code: Cache socket state inside ensureConnection()Markus Goetz2010-01-111-4/+6
| | | | Reviewed-by: TrustMe
* QNAM HTTP Code: When starting new request, prefer connected sockets.Markus Goetz2010-01-111-5/+17
| | | | | | | Prefer a QHttpNetworkConnectionChannel which has a connected socket to a channel which doesn't have a connected socket. Reviewed-by: Peter Hartmann
* QNAM HTTP: Don't call d_func() so oftenMarkus Goetz2010-01-111-27/+30
| | | | Reviewed-by: Peter Hartmann
* QNAM HTTP: Fix readBuffer maximum size.Markus Goetz2010-01-1110-1/+54
| | | | | | | | | | QHttpNetworkReply has now a throttled mode. If this is activated, it will only read HTTP body when its internal buffer is empty. This means that QNetworkReply.setReadBufferSize() can finally be used for bandwidth limiting. Thanks to David Faure for helping out. Reviewed-By: Peter Hartmann
* QNAM HTTP: Optimize eatWhitespace()Markus Goetz2010-01-111-3/+10
| | | | | | Avoid calling socket->bytesAvailable(). Reviewed-by: Thiago
* QNAM HTTP: Check if socket already tries to connect.Markus Goetz2010-01-111-5/+12
| | | | | | | This should get rid of QAbstractSocket warnings we sometimes emit. Reviewed-by: Thiago Reviewed-by: Peter Hartmann
* network internals: fix build on S60Peter Hartmann2010-01-111-1/+1
| | | | Reviewed-by: Paul
* network internals: start HTTP GET requests right away when calledPeter Hartmann2010-01-117-18/+30
| | | | | | | | | | | | | on the code path from QNetworkAccessManager::get() to QTcpSocket::write() there were two calls involved that were invoked via a QueuedConnection, which would in some occasions delay writing the data to the socket. This patch makes sure the data is written to the socket immediately, without returning to the event loop (only the HTTP backend was changed for that event, the other backends were not changed) Reviewed-by: Thiago Macieira Reviewed-by: Markus Goetz
* Fix regression introduced in e49aee9f: set If-Modified-Since.Thiago Macieira2010-01-111-8/+8
| | | | | | | | I moved the code above the other tests because it's more complex. But, of course, that's wrong because it returns without setting the necessary headers. Reviewed-by: Peter Hartmann
* QNAM HTTP: just use the expirationDate in the code that validates the cacheThiago Macieira2010-01-081-2/+6
| | | | | | The max-age handling is already done in the cache-saving code. Reviewed-by: Peter Hartmann
* QNAM HTTP: change the caching semantics to match documentationThiago Macieira2010-01-081-7/+10
| | | | | | | PreferCache should not use the network even if must-revalidate is set. But if it is not fresh enough, then it should use the network. Reviewed-by: Peter Hartmann
* QNAM HTTP: fix the caching algorithm from RFC 2616Thiago Macieira2010-01-081-4/+10
| | | | Reviewed-by: Peter Hartmann
* Update copyright year to 2010Jason McDonald2010-01-06136-136/+136
| | | | Reviewed-by: Trust Me
* QHttpSocketEngine: Remove unneeded codeMarkus Goetz2010-01-062-18/+4
| | | | | | | There was a buffer that is always empty since it was only used for parsing the HTTP proxy protocol, not the actual socket data. Reviewed-by: Peter Hartmann
* QAbstractSocket: Fix warnings when compiling with QABSTRACTSOCKET_DEBUGMarkus Goetz2010-01-061-9/+9
|
* QAbstractSocket: Warn when wrong QHostInfo was receivedMarkus Goetz2010-01-061-0/+4
| | | | | | Let's see if this happens. Reviewed-by: Thiago
* Change QHostInfo to use 5 parallel lookup threadsMarkus Goetz2009-12-173-194/+257
| | | | | | | | Instead of sequentially looking up and potentially taking a long time, we now do work in parallel. Reviewed-by: ogoffart Reviewed-by: lars
* Doc: fix typoVolker Hilsheimer2009-12-171-1/+1
| | | | Fixes: QTBUG-6539
* QNAM Code: Do not re-abort or continue processing notifications.Markus Goetz2009-12-141-2/+2
| | | | | | | This should finally enable us to use DirectConnection in QNetworkReplyHandler of QtWebKit. Reviewed-by: thiago
* Fix compilation if QT_NO_DATESTRING is defined.Thiago Macieira2009-12-101-0/+3
| | | | | | | | If we have no string parsing in QDateTime, then we use sscanf, so we must include <stdio.h> Task-number: QTBUG-6668 Reviewed-by: Markus Goetz
* QNetworkCookieJar: don't do path checking when receiving cookiesPeter Hartmann2009-11-241-3/+4
| | | | | | | | | | | | Actually, the RFC 2109 says cookies should not be stored if the path attribute is not a prefix of the request URI the cookie comes from. However, all browsers allow it anyway; with the demo browser e.g. logging in to wordpress.com was not possible. We still do path checking when sending cookies, i.e. in QNetworkCookieJar::cookiesForUrl(). Reviewed-by: Markus Goetz Task-number: QTBUG-5815
* Fix QWindowsSystemProxy::initMarkus Goetz2009-11-241-1/+4
| | | | | | | | Seems like WinHttpGetIEProxyConfigForCurrentUser can return more than one proxy even if this is not documented. Task-number: QTBUG-5981 Reviewed-by: Peter Hartmann
* QNativeSocketEngine: Compile fixMarkus Goetz2009-11-191-1/+1
| | | | Reviewed-by: Peter Hartmann
* QNAM HTTP Code: Use KeepAlive socket optionMarkus Goetz2009-11-191-0/+2
| | | | Reviewed-by: TrustMe
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-11-192-8/+8
|\
| * Ran the script utils/normalizeOlivier Goffart2009-11-182-8/+8
| | | | | | | | Over src/ tools/ examples/ and demos/
* | QTcpSocket: Fix waitForConnected on WindowsMarkus Goetz2009-11-192-7/+65
|/ | | | | | | | | The select() system call was used in the wrong way. We need to select for exceptions too. Task-number: QTBUG-5799 Reviewed-by: Aleksandar Sasha Babic <aleksandar.babic@nokia.com> Reviewed-by: Peter Hartmann
* Fix compilation without Qt3support (on Windows CE, Symbian)Simon Hausmann2009-11-161-1/+1
| | | | | | Don't use QFile's Qt3support member, use fileName() instead. Reviewed-by: Trust me
* Introduce QFileNetworkReply in QNetworkAccessManagerMarkus Goetz2009-11-134-0/+326
| | | | | | | | | | | | | The QFileNetworkReply is a wrapper around QFile that has therefore similar performance. This avoids the usage of the unperformant QNetworkAccessFileBackend. The benchmark qfile_vs_qnetworkaccessmanager shows that the QFileNetworkReply's performance is better than 0.9x of QFile compared to QNetworkAccessFileBackend which had about 0.5x of QFile. Reviewed-by: Peter Hartmann
* Merge commit 'coreteam/4.6' into oslo1-4.6Marius Storm-Olsen2009-11-136-32/+106
|\
| * QNAM: Parse RFC1123 directly and don't go through QLocaleHolger Hans Peter Freyther2009-11-111-8/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | The QDateTimeParser forces at least two QString allocations to convert the Month string into a integer. This makes parsing the date string the most expesnsive operation from within replyHeaderChanged. Use sscanf to parse the RFC1123 header to get a significant speedup. Use a switch case statement to convert the month name to a integer. Reviewed-By: Markus Goetz
| * QNAM: Remove some more occurences of toLower on the hot pathHolger Hans Peter Freyther2009-11-113-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | toLower will force a memory allocation, and memory allocations are certainly adding a delay. Use qstricmp were this is easily possible. This change makes headerValues et all drop out of the profile. QChar::toLower will now be called more often, specially for loops that do linear searching. In the profile with real web content this is faster than using QByteArry::toLower in the inner loop and the forced memory allocations. Reviewed-By: Markus Goetz
| * QNAM: Avoid using toLower for case insensitive comparisionHolger Hans Peter Freyther2009-11-111-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using qstricmp is faster on the desktop than the alloc of QByteArray::toLower and the QByteArray::operator==. QChar::toLower will now be called for the input key from within the loop. In the measurements done this is still a performance improvement over the allocation done by QByteArray::toLower. For more header values this might not be the case anymore. RESULT : tst_Loading::byteArrayTestLower(): 0.00076 msec per iteration (total: 25, iterations: 32768) RESULT : tst_Loading::byteArrayTestCompare(): 0.00028 msec per iteration (total: 37, iterations: 131072) Reviewed-By: Markus Goetz
| * QNAM HTTP Code: Start accept-language header with capital letterMarkus Goetz2009-11-101-1/+1
| | | | | | | | | | | | | | HTTP header names are case insensitive, but stick to what all browsers etc. use to work around buggy servers. Reviewed-by: TrustMe
| * Merge branch '4.6' into core-4.6Thiago Macieira2009-11-098-15/+29
| |\
| * | QNAM HTTP Code: Also send our locale name as accept-languageMarkus Goetz2009-11-091-4/+13
| | | | | | | | | | | | | | | | | | Inspired by merge request 2012 by Joel Nordell Reviewed-by: Peter Hartmann