diff Core/HttpServer/HttpFileSender.cpp @ 330:78a8eaa5f30b

cookies
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Jan 2013 11:41:13 +0100
parents 64925c94825c
children bdd72233b105
line wrap: on
line diff
--- a/Core/HttpServer/HttpFileSender.cpp	Tue Jan 08 14:56:10 2013 +0100
+++ b/Core/HttpServer/HttpFileSender.cpp	Wed Jan 09 11:41:13 2013 +0100
@@ -38,20 +38,7 @@
 {
   void HttpFileSender::SendHeader(HttpOutput& output)
   {
-    HttpHandler::Arguments header;
-    header["Content-Length"] = boost::lexical_cast<std::string>(GetFileSize());
-
-    if (contentType_.size() > 0)
-    {
-      header["Content-Type"] = contentType_;
-    }
-
-    if (downloadFilename_.size() > 0)
-    {
-      header["Content-Disposition"] = "attachment; filename=\"" + downloadFilename_ + "\"";
-    }
-  
-    output.SendOkHeader(header);
+    output.SendOkHeader(contentType_.c_str(), true, GetFileSize(), downloadFilename_.c_str());
   }
 
   void HttpFileSender::Send(HttpOutput& output)