1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtNetwork module of the Qt Toolkit. |
7 ** This file is part of the QtNetwork module of the Qt Toolkit. |
8 ** |
8 ** |
172 void prepareRequest(HttpMessagePair &request); |
172 void prepareRequest(HttpMessagePair &request); |
173 |
173 |
174 void fillPipeline(QAbstractSocket *socket); |
174 void fillPipeline(QAbstractSocket *socket); |
175 bool fillPipeline(QList<HttpMessagePair> &queue, QHttpNetworkConnectionChannel &channel); |
175 bool fillPipeline(QList<HttpMessagePair> &queue, QHttpNetworkConnectionChannel &channel); |
176 |
176 |
|
177 // read more HTTP body after the next event loop spin |
|
178 void readMoreLater(QHttpNetworkReply *reply); |
|
179 |
177 void copyCredentials(int fromChannel, QAuthenticator *auth, bool isProxy); |
180 void copyCredentials(int fromChannel, QAuthenticator *auth, bool isProxy); |
178 |
181 |
179 // private slots |
182 // private slots |
180 void _q_startNextRequest(); // send the next request from the queue |
183 void _q_startNextRequest(); // send the next request from the queue |
181 void _q_restartAuthPendingRequests(); // send the currently blocked request |
184 void _q_restartAuthPendingRequests(); // send the currently blocked request |
182 |
185 |
183 void createAuthorization(QAbstractSocket *socket, QHttpNetworkRequest &request); |
186 void createAuthorization(QAbstractSocket *socket, QHttpNetworkRequest &request); |
184 |
187 |
185 QString errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket *socket); |
188 QString errorDetail(QNetworkReply::NetworkError errorCode, QAbstractSocket *socket, |
|
189 const QString &extraDetail = QString()); |
186 |
190 |
187 #ifndef QT_NO_COMPRESS |
191 #ifndef QT_NO_COMPRESS |
188 bool expand(QAbstractSocket *socket, QHttpNetworkReply *reply, bool dataComplete); |
192 bool expand(QAbstractSocket *socket, QHttpNetworkReply *reply, bool dataComplete); |
189 #endif |
193 #endif |
190 void removeReply(QHttpNetworkReply *reply); |
194 void removeReply(QHttpNetworkReply *reply); |
204 |
208 |
205 |
209 |
206 void emitReplyError(QAbstractSocket *socket, QHttpNetworkReply *reply, QNetworkReply::NetworkError errorCode); |
210 void emitReplyError(QAbstractSocket *socket, QHttpNetworkReply *reply, QNetworkReply::NetworkError errorCode); |
207 bool handleAuthenticateChallenge(QAbstractSocket *socket, QHttpNetworkReply *reply, bool isProxy, bool &resend); |
211 bool handleAuthenticateChallenge(QAbstractSocket *socket, QHttpNetworkReply *reply, bool isProxy, bool &resend); |
208 |
212 |
209 |
|
210 #ifndef QT_NO_OPENSSL |
|
211 QSslConfiguration sslConfiguration(const QHttpNetworkReply &reply) const; |
|
212 #endif |
|
213 |
|
214 #ifndef QT_NO_NETWORKPROXY |
213 #ifndef QT_NO_NETWORKPROXY |
215 QNetworkProxy networkProxy; |
214 QNetworkProxy networkProxy; |
216 void emitProxyAuthenticationRequired(const QHttpNetworkConnectionChannel *chan, const QNetworkProxy &proxy, QAuthenticator* auth); |
215 void emitProxyAuthenticationRequired(const QHttpNetworkConnectionChannel *chan, const QNetworkProxy &proxy, QAuthenticator* auth); |
217 #endif |
216 #endif |
218 |
217 |