Ejemplo n.º 1
0
 internal HttpListenerResponse()
 {
     if (Logging.On)
     {
         Logging.PrintInfo(Logging.HttpListener, this, ".ctor", "");
     }
     m_NativeResponse                      = new UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE();
     m_WebHeaders                          = new WebHeaderCollection(WebHeaderCollectionType.HttpListenerResponse);
     m_BoundaryType                        = BoundaryType.None;
     m_NativeResponse.StatusCode           = (ushort)HttpStatusCode.OK;
     m_NativeResponse.Version.MajorVersion = 1;
     m_NativeResponse.Version.MinorVersion = 1;
     m_KeepAlive     = true;
     m_ResponseState = ResponseState.Created;
 }
Ejemplo n.º 2
0
 public void CopyFrom(HttpListenerResponse templateResponse)
 {
     if (Logging.On)
     {
         Logging.PrintInfo(Logging.HttpListener, this, "CopyFrom", "templateResponse#" + ValidationHelper.HashString(templateResponse));
     }
     m_NativeResponse                      = new UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE();
     m_ResponseState                       = ResponseState.Created;
     m_WebHeaders                          = templateResponse.m_WebHeaders;
     m_BoundaryType                        = templateResponse.m_BoundaryType;
     m_ContentLength                       = templateResponse.m_ContentLength;
     m_NativeResponse.StatusCode           = templateResponse.m_NativeResponse.StatusCode;
     m_NativeResponse.Version.MajorVersion = templateResponse.m_NativeResponse.Version.MajorVersion;
     m_NativeResponse.Version.MinorVersion = templateResponse.m_NativeResponse.Version.MinorVersion;
     m_StatusDescription                   = templateResponse.m_StatusDescription;
     m_KeepAlive = templateResponse.m_KeepAlive;
 }