equal
deleted
inserted
replaced
63 |
63 |
64 #include <private/qhttpnetworkheader_p.h> |
64 #include <private/qhttpnetworkheader_p.h> |
65 #include <private/qhttpnetworkrequest_p.h> |
65 #include <private/qhttpnetworkrequest_p.h> |
66 #include <private/qhttpnetworkreply_p.h> |
66 #include <private/qhttpnetworkreply_p.h> |
67 |
67 |
|
68 #include "qhttpnetworkconnection_p.h" |
68 |
69 |
69 #ifndef QT_NO_HTTP |
70 #ifndef QT_NO_HTTP |
70 |
71 |
71 #ifndef QT_NO_OPENSSL |
72 #ifndef QT_NO_OPENSSL |
72 # include <QtNetwork/qsslsocket.h> |
73 # include <QtNetwork/qsslsocket.h> |
78 QT_BEGIN_NAMESPACE |
79 QT_BEGIN_NAMESPACE |
79 |
80 |
80 class QHttpNetworkRequest; |
81 class QHttpNetworkRequest; |
81 class QHttpNetworkReply; |
82 class QHttpNetworkReply; |
82 class QByteArray; |
83 class QByteArray; |
83 class QHttpNetworkConnection; |
|
84 |
84 |
85 #ifndef HttpMessagePair |
85 #ifndef HttpMessagePair |
86 typedef QPair<QHttpNetworkRequest, QHttpNetworkReply*> HttpMessagePair; |
86 typedef QPair<QHttpNetworkRequest, QHttpNetworkReply*> HttpMessagePair; |
87 #endif |
87 #endif |
88 |
88 |
125 }; |
125 }; |
126 PipeliningSupport pipeliningSupported; |
126 PipeliningSupport pipeliningSupported; |
127 QList<HttpMessagePair> alreadyPipelinedRequests; |
127 QList<HttpMessagePair> alreadyPipelinedRequests; |
128 |
128 |
129 |
129 |
130 QHttpNetworkConnectionChannel() : socket(0), state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false), |
130 QHttpNetworkConnectionChannel(); |
131 lastStatus(0), pendingEncrypt(false), reconnectAttempts(2), |
131 |
132 authMehtod(QAuthenticatorPrivate::None), proxyAuthMehtod(QAuthenticatorPrivate::None) |
132 void setConnection(QHttpNetworkConnection *c); |
133 #ifndef QT_NO_OPENSSL |
133 QPointer<QHttpNetworkConnection> connection; |
134 , ignoreAllSslErrors(false) |
|
135 #endif |
|
136 , pipeliningSupported(PipeliningSupportUnknown) |
|
137 , connection(0) |
|
138 {} |
|
139 |
|
140 void setConnection(QHttpNetworkConnection *c) {connection = c;} |
|
141 QHttpNetworkConnection *connection; |
|
142 |
134 |
143 void init(); |
135 void init(); |
144 void close(); |
136 void close(); |
145 |
137 |
146 bool sendRequest(); |
138 bool sendRequest(); |
155 |
147 |
156 void pipelineInto(HttpMessagePair &pair); |
148 void pipelineInto(HttpMessagePair &pair); |
157 void requeueCurrentlyPipelinedRequests(); |
149 void requeueCurrentlyPipelinedRequests(); |
158 void detectPipeliningSupport(); |
150 void detectPipeliningSupport(); |
159 |
151 |
|
152 void handleUnexpectedEOF(); |
160 void closeAndResendCurrentRequest(); |
153 void closeAndResendCurrentRequest(); |
161 |
154 |
162 void eatWhitespace(); |
155 void eatWhitespace(); |
163 |
156 |
164 bool isSocketBusy() const; |
157 bool isSocketBusy() const; |
184 void _q_sslErrors(const QList<QSslError> &errors); // ssl errors from the socket |
177 void _q_sslErrors(const QList<QSslError> &errors); // ssl errors from the socket |
185 void _q_encryptedBytesWritten(qint64 bytes); // proceed sending |
178 void _q_encryptedBytesWritten(qint64 bytes); // proceed sending |
186 #endif |
179 #endif |
187 }; |
180 }; |
188 |
181 |
189 |
|
190 |
|
191 QT_END_NAMESPACE |
182 QT_END_NAMESPACE |
192 |
183 |
193 #endif // QT_NO_HTTP |
184 #endif // QT_NO_HTTP |
194 |
185 |
195 #endif |
186 #endif |