using System.Net.Configuration;
using System.Diagnostics.CodeAnalysis;
+#if !MONO
internal enum ReadState {
Start,
StatusLine, // about to parse status line
Headers, // reading headers
Data // now read data
}
+#endif
internal enum DataParseStatus {
NeedMoreData = 0, // need more data
public WebParseErrorCode Code;
}
-
+#if !MONO
struct TunnelStateObject {
internal TunnelStateObject(HttpWebRequest r, Connection c){
Connection = c;
if (startRequestResult != TriState.Unspecified) {
CompleteStartRequest(true, request, startRequestResult);
}
- // On Sync, we wait for the Connection to be come availble here,
+ // On [....], we wait for the Connection to be come availble here,
if (!request.Async)
{
object responseObject = request.ConnectionAsyncResult.InternalWaitForCompletion();
//
// From now on the request.SetRequestSubmitDone must be called or it may hang
- // For a sync request the write side reponse windowwas opened in HttpWebRequest.SubmitRequest
+ // For a [....] request the write side reponse windowwas opened in HttpWebRequest.SubmitRequest
if (request.Async)
request.OpenWriteSideResponseWindow();
WebExceptionStatus ws = WebExceptionStatus.ConnectFailure;
//
// From now on the request.SetRequestSubmitDone must be called or it may hang
- // For a sync request the write side reponse windowwas opened in HttpWebRequest.SubmitRequest
+ // For a [....] request the write side reponse windowwas opened in HttpWebRequest.SubmitRequest
if (request.Async)
request.OpenWriteSideResponseWindow();
if (nextRequest != null )
{
// We cannot have HeadersCompleted on the request that was not placed yet on the write list
- if(nextRequest.HeadersCompleted) //
+ if(nextRequest.HeadersCompleted) // TODO: change to be Assert but only when stress got stable-stable
throw new InternalException();
// This codepath doesn't handle the case where the server has closed the
// IIS6 does not close the connection on 403 so all subsequent requests will fail to be authorized on THAT connection.
//-----------------------------------------------------------------------------------------------
//5/15/2006
- //Microsoft
+ //[....]
//The DTS Issue 595216 claims that we are unnecessarily closing the
//connection on 403 - even if it is a non SSL request. It seems
//that the original intention is to close the request for SSL requests
else
{
//QFE: 4599.
- //Author: Microsoft
+ //Author: [....]
//in v2.0, in case of SSL Requests through proxy that require NTLM authentication,
//we are not honoring the Proxy-Connection: Keep-Alive header and
//closing the connection.
{
if (m_Error == WebExceptionStatus.Success)
{
- throw new InternalException(); //
+ throw new InternalException(); // TODO: replace it with a generic error for the product bits
//m_Error = WebExceptionStatus.UnknownError;
}
}
}
//
- // Peforms a Sync Read and calls the ReadComplete to process the result
+ // Peforms a [....] Read and calls the ReadComplete to process the result
// The reads are done iteratively, until the Request has received enough
// data to contruct a response, or a 100-Continue is read, allowing the HttpWebRequest
// to return a write stream
if (probeRead)
{
- // Sync 100-Continue wait only
+ // [....] 100-Continue wait only
request.FinishContinueWait();
if (pollSuccess)
{
}
//
// Any exception is processed by HandleError() and ----ed to avoid throwing on a thread pool
- // In the sync case the HandleError() will abort the request so the caller will pick up the result.
+ // In the [....] case the HandleError() will abort the request so the caller will pick up the result.
//
catch (Exception exception) {
if (NclUtilities.IsFatal(exception)) throw;
}
#endif
}
+#endif
}