|
|
|
|
| 145 |
|
145 |
|
| 146 |
RefPtr<HttpServer> mServer; |
146 |
RefPtr<HttpServer> mServer; |
| 147 |
nsCOMPtr<nsISocketTransport> mTransport; |
147 |
nsCOMPtr<nsISocketTransport> mTransport; |
| 148 |
nsCOMPtr<nsIAsyncInputStream> mInput; |
148 |
nsCOMPtr<nsIAsyncInputStream> mInput; |
| 149 |
nsCOMPtr<nsIAsyncOutputStream> mOutput; |
149 |
nsCOMPtr<nsIAsyncOutputStream> mOutput; |
| 150 |
|
150 |
|
| 151 |
enum { eRequestLine, eHeaders, eBody, ePause } mState; |
151 |
enum { eRequestLine, eHeaders, eBody, ePause } mState; |
| 152 |
RefPtr<InternalRequest> mPendingReq; |
152 |
RefPtr<InternalRequest> mPendingReq; |
| 153 |
uint32_t mPendingReqVersion; |
153 |
// mPendingReqVersion & mRemainingBodySize get initialized at the early stages of line consumption |
|
|
154 |
MOZ_INIT_OUTSIDE_CTOR uint32_t mPendingReqVersion; |
| 154 |
nsCString mInputBuffer; |
155 |
nsCString mInputBuffer; |
| 155 |
nsCString mPendingHeaderName; |
156 |
nsCString mPendingHeaderName; |
| 156 |
nsCString mPendingHeaderValue; |
157 |
nsCString mPendingHeaderValue; |
| 157 |
uint32_t mRemainingBodySize; |
158 |
MOZ_INIT_OUTSIDE_CTOR uint32_t mRemainingBodySize; |
| 158 |
nsCOMPtr<nsIAsyncOutputStream> mCurrentRequestBody; |
159 |
nsCOMPtr<nsIAsyncOutputStream> mCurrentRequestBody; |
| 159 |
bool mCloseAfterRequest; |
160 |
bool mCloseAfterRequest; |
| 160 |
|
161 |
|
| 161 |
typedef Pair<RefPtr<InternalRequest>, |
162 |
typedef Pair<RefPtr<InternalRequest>, |
| 162 |
RefPtr<InternalResponse>> PendingRequest; |
163 |
RefPtr<InternalResponse>> PendingRequest; |
| 163 |
nsTArray<PendingRequest> mPendingRequests; |
164 |
nsTArray<PendingRequest> mPendingRequests; |
| 164 |
RefPtr<MozPromise<nsresult, bool, false>> mOutputCopy; |
165 |
RefPtr<MozPromise<nsresult, bool, false>> mOutputCopy; |
| 165 |
|
166 |
|