public static void WriteHeaders(IHttpWriter writer, IFubuFile file) { var mimeType = MimeType.MimeTypeByFileName(file.Path); if (mimeType != null) { writer.AppendHeader(HttpResponseHeaders.ContentType, mimeType.Value); } writer.AppendHeader(HttpResponseHeaders.LastModified, file.LastModified().ToString("r")); writer.AppendHeader(HttpResponseHeaders.ETag, file.Etag().Quoted()); }
public override void Write(IHttpWriter writer) { WriteHeaders(writer, _file); if (_status == HttpStatusCode.OK) { writer.AppendHeader(HttpResponseHeaders.ContentLength, _file.Length().ToString()); } writer.WriteResponseCode(_status); }
public void AppendHeader(string header, string value) { _writer.AppendHeader(header, value); }
public void Replay(IHttpWriter writer) { writer.AppendHeader(Name, Value); }