Skip to content

Commit a47f526

Browse files
author
Sebastiano Merlino
committed
Avoid undefined symbols in http_response
1 parent 7176ec3 commit a47f526

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/http_response.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,27 @@ size_t http_response::get_footers(std::map<std::string, std::string, header_comp
8383
return result.size();
8484
}
8585

86+
const std::vector<std::pair<std::string, std::string> > http_response::get_cookies()
87+
{
88+
std::vector<std::pair<std::string, std::string> > to_ret;
89+
std::map<std::string, std::string, header_comparator>::const_iterator it;
90+
for(it = cookies.begin(); it != cookies.end(); ++it)
91+
to_ret.push_back(*it);
92+
return to_ret;
93+
}
94+
size_t http_response::get_cookies(std::vector<std::pair<std::string, std::string> >& result)
95+
{
96+
std::map<std::string, std::string, header_comparator>::const_iterator it;
97+
for(it = cookies.begin(); it != cookies.end(); ++it)
98+
result.push_back(*it);
99+
return result.size();
100+
}
101+
size_t http_response::get_cookies(std::map<std::string, std::string, header_comparator>& result)
102+
{
103+
result = this->cookies;
104+
return result.size();
105+
}
106+
86107
//RESPONSE
87108
shoutCAST_response::shoutCAST_response
88109
(

0 commit comments

Comments
 (0)