diff options
Diffstat (limited to 'MediaBrowser.Controller/Net/RequestContext.cs')
| -rw-r--r-- | MediaBrowser.Controller/Net/RequestContext.cs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/MediaBrowser.Controller/Net/RequestContext.cs b/MediaBrowser.Controller/Net/RequestContext.cs deleted file mode 100644 index 531faab84..000000000 --- a/MediaBrowser.Controller/Net/RequestContext.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Linq;
-using System.Net;
-using System.IO.Compression;
-
-namespace MediaBrowser.Controller.Net
-{
- public class RequestContext
- {
- public HttpListenerRequest Request { get; private set; }
- public HttpListenerResponse Response { get; private set; }
-
- public RequestContext(HttpListenerContext context)
- {
- Response = context.Response;
- Request = context.Request;
- }
-
- public void Respond(Response response)
- {
- Response.AddHeader("Access-Control-Allow-Origin", "*");
-
- foreach (var header in response.Headers)
- {
- Response.AddHeader(header.Key, header.Value);
- }
-
- Response.ContentType = response.ContentType;
- Response.StatusCode = response.StatusCode;
-
- Response.SendChunked = true;
-
- GZipStream gzipStream = new GZipStream(Response.OutputStream, CompressionMode.Compress, false);
-
- response.WriteStream(Response.OutputStream);
- }
- }
-}
\ No newline at end of file |
