156 lines
2.8 KiB
C#
156 lines
2.8 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Rei.Net.HttpServer.MyHttpServerRequest
|
|
// Assembly: Rei.Net.HttpServer, Version=1.13.2.9297, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 6174F8E9-E7BA-46AD-8F2E-196645884F28
|
|
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Net.HttpServer.dll
|
|
|
|
using System;
|
|
using System.Collections.Specialized;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
|
|
namespace Rei.Net.HttpServer
|
|
{
|
|
[DebuggerDisplay("{toString}")]
|
|
public class MyHttpServerRequest : IDisposable
|
|
{
|
|
internal bool _isvalidrequest;
|
|
internal string _requestline;
|
|
internal string _method;
|
|
internal string _version;
|
|
internal Uri _requesturi;
|
|
internal string _rawuri;
|
|
internal NameValueCollection _requestheaders;
|
|
internal long _contentlength;
|
|
internal Stream _reqstream;
|
|
internal string _host;
|
|
internal bool _badrequest;
|
|
internal bool _expect100continue;
|
|
private bool disposedValue;
|
|
|
|
internal MyHttpServerRequest()
|
|
{
|
|
this.disposedValue = false;
|
|
this._requestheaders = new NameValueCollection();
|
|
}
|
|
|
|
public Uri RequestUri
|
|
{
|
|
get
|
|
{
|
|
return this._requesturi;
|
|
}
|
|
set
|
|
{
|
|
this._requesturi = value;
|
|
}
|
|
}
|
|
|
|
public string Host
|
|
{
|
|
get
|
|
{
|
|
return this._host;
|
|
}
|
|
}
|
|
|
|
public string RawUri
|
|
{
|
|
get
|
|
{
|
|
return this._rawuri;
|
|
}
|
|
}
|
|
|
|
public string Method
|
|
{
|
|
get
|
|
{
|
|
return this._method;
|
|
}
|
|
}
|
|
|
|
public string Version
|
|
{
|
|
get
|
|
{
|
|
return this._version;
|
|
}
|
|
}
|
|
|
|
public string RequestLine
|
|
{
|
|
get
|
|
{
|
|
return this._requestline;
|
|
}
|
|
}
|
|
|
|
public NameValueCollection Headers
|
|
{
|
|
get
|
|
{
|
|
return this._requestheaders;
|
|
}
|
|
}
|
|
|
|
public long ContentLength
|
|
{
|
|
get
|
|
{
|
|
return this._contentlength;
|
|
}
|
|
}
|
|
|
|
public string ContentType
|
|
{
|
|
get
|
|
{
|
|
return this._requestheaders.Get("Content-Type");
|
|
}
|
|
}
|
|
|
|
public string UserAgent
|
|
{
|
|
get
|
|
{
|
|
return this._requestheaders.Get("User-Agent");
|
|
}
|
|
}
|
|
|
|
public bool Expect100Continue
|
|
{
|
|
get
|
|
{
|
|
return this._expect100continue;
|
|
}
|
|
}
|
|
|
|
public Stream InputStream
|
|
{
|
|
get
|
|
{
|
|
return this._reqstream;
|
|
}
|
|
}
|
|
|
|
protected virtual void Dispose(bool disposing)
|
|
{
|
|
if (!this.disposedValue && disposing)
|
|
this._reqstream.Close();
|
|
this.disposedValue = true;
|
|
}
|
|
|
|
public void Close()
|
|
{
|
|
this.Dispose(true);
|
|
GC.SuppressFinalize((object) this);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return this._requestline + " " + this._host;
|
|
}
|
|
}
|
|
}
|