From b94417b845de4bd5c8e0b2abeaa50958135c7878 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Wed, 13 Mar 2013 10:01:02 -0400 Subject: [PATCH] #22 - Support Http Head requests --- .../HttpServer/BaseRestService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs b/MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs index baa5b08883..e301f0496e 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/BaseRestService.cs @@ -270,7 +270,12 @@ namespace MediaBrowser.Server.Implementations.HttpServer } httpListenerResponse.ContentLength64 = stream.Length; - return new StreamWriter(stream, Logger); + return headersOnly ? null : new StreamWriter(stream, Logger); + } + + if (headersOnly) + { + return null; } string content;