Пример #1
0
        public HttpResponse(IHttpTransaction transaction, IOStream stream)
        {
            Transaction = transaction;
            IOStream = stream;

            StatusCode = 200;

            WriteHeaders = true;

            Headers = new HttpHeaders ();
            Stream = new HttpResponseStream (this, IOStream);
            Stream.Chunked = (transaction.Request.MajorVersion > 0 && transaction.Request.MinorVersion > 0);
        }
Пример #2
0
        public HttpResponse(IHttpTransaction transaction)
        {
            Transaction = transaction;

            StatusCode = 200;

            WriteHeaders = true;

            Headers = new HttpHeaders ();
            Stream = new HttpResponseStream ();
            Writer = new StreamWriter (Stream);
            Cookies = new Dictionary<string, HttpCookie> ();

            SetStandardHeaders ();
        }
Пример #3
0
        public HttpResponse(IHttpTransaction transaction, IOStream stream)
        {
            Transaction = transaction;
            IOStream = stream;

            StatusCode = 200;

            WriteHeaders = true;

            Headers = new HttpHeaders ();
            Stream = new HttpResponseStream (this, IOStream);
            Stream.Chunked = (transaction.Request.MajorVersion > 0 && transaction.Request.MinorVersion > 0);

            end_watcher = new AsyncWatcher (IOLoop.Instance.EventLoop, OnEnd);
            end_watcher.Start ();
        }