summaryrefslogtreecommitdiff
path: root/lib/HttpServ.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/HttpServ.cc')
-rw-r--r--lib/HttpServ.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc
index 3b14c49..a16bc45 100644
--- a/lib/HttpServ.cc
+++ b/lib/HttpServ.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: HttpServ.cc,v 1.63 2008-07-16 09:37:40 pixel Exp $ */
+/* $Id: HttpServ.cc,v 1.64 2008-07-16 16:50:24 pixel Exp $ */
#include <vector>
@@ -915,6 +915,15 @@ void HttpResponse::PrepareResponse(Handle * b) {
strftime(buf, 1024, "%a, %d %b %Y %H:%M:%S GMT", ft);
(*b) << "Last-Modified: " << buf << "\r\n";
}
+ if (cookies.size()) {
+ (*b) << "Set-Cookie: ";
+ for (std::vector<std::pair<String, String> >::iterator i = cookies.begin(); i != cookies.end(); i++) {
+ (*b) << i->first << "=" << i->second << ";";
+ }
+ if (cookies_path != "")
+ (*b) << "path=" << cookies_path;
+ (*b) << "\r\n";
+ }
(*b) << "\r\n";
}