Inheritance: IEnumerable
 protected internal HttpClientResponse(Connection connection, HttpHeaders headers)
     : base(connection, headers)
 {
     this.fCode = Int32.Parse(Header.ResponseCode);
 }
示例#2
0
		public static HttpHeaders Create(Connection connection)
		{
			HttpHeaders lResult = new HttpHeaders();
			if (!lResult.ReadHeader(connection))
				return null;

			return lResult;
		}
 protected internal HttpOutgoingRequestResponse(HttpHeaders header)
     : base(header)
 {
     CloseStream = true;
     ContentSource = ContentSource.ContentNone;
 }
        protected internal HttpServerRequest(Connection connection, HttpHeaders headers)
            : base(connection, headers)
        {
            String lPath = Header.RequestPath;
            Int32 lStart = lPath.IndexOf("?");

            if (lStart > -1)
            {
                fQuery = lPath.Substring(lStart + 1);
                fPath = lPath.Substring(0, lStart);
            }
            else
            {
                fPath = lPath;
            }
        }
 protected HttpRequestResponse(HttpHeaders header)
 {
     this.Header = header;
     this.Encoding = Encoding.ASCII;
 }
 protected HttpIncomingRequestResponse(Connection connection, HttpHeaders headers)
     : base(headers)
 {
     this.DataConnection = connection;
 }
示例#7
0
		private static void SetAuthorizationHeader(HttpHeaders headers, String header, String username, String password)
		{
			if (String.IsNullOrEmpty(username))
				return;

			Byte[] lByteData = System.Text.Encoding.UTF8.GetBytes(username + ":" + password);
			String lAuthData = "Basic " + Convert.ToBase64String(lByteData, 0, lByteData.Length);

			headers.SetHeaderValue(header, lAuthData);
		}
		protected internal HttpClientResponse(Connection connection, HttpHeaders headers)
			: base(connection, headers)
		{
		}
		public HttpServerRequest(Connection connection, HttpHeaders headers)
			: base(connection, headers)
		{
			String lPath = Header.RequestPath;
			Int32 lStart = lPath.IndexOf("?", StringComparison.Ordinal);

			if (lStart > -1)
			{
				fQuery = lPath.Substring(lStart + 1);
				fPath = lPath.Substring(0, lStart);
			}
			else
			{
				fPath = lPath;
			}
		}