diff options
Diffstat (limited to 'lib/HttpServ.cc')
-rw-r--r-- | lib/HttpServ.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc index 2e1779b..7b757a9 100644 --- a/lib/HttpServ.cc +++ b/lib/HttpServ.cc @@ -915,11 +915,9 @@ 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()) { + for (std::vector<std::pair<String, String> >::iterator i = cookies.begin(); i != cookies.end(); i++) { (*b) << "Set-Cookie: "; - for (std::vector<std::pair<String, String> >::iterator i = cookies.begin(); i != cookies.end(); i++) { - (*b) << i->first << "=" << i->second << ";"; - } + (*b) << i->first << "=" << i->second << ";"; if (cookies_path != "") (*b) << "path=" << cookies_path; (*b) << "\r\n"; |