Skip to content

Commit da21676

Browse files
committed
Change getter to const
1 parent 7ad5009 commit da21676

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/http_response.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ http_response::~http_response()
4242
webserver::unlock_cache_entry(ce);
4343
}
4444

45-
size_t http_response::get_headers(std::map<std::string, std::string, header_comparator>& result)
45+
size_t http_response::get_headers(std::map<std::string, std::string, header_comparator>& result) const
4646
{
4747
result = this->headers;
4848
return result.size();

src/httpserver/http_response.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,7 @@ class http_response
322322
* Method used to get all headers passed with the request.
323323
* @return a map<string,string> containing all headers.
324324
**/
325-
size_t get_headers(
326-
std::map<std::string, std::string, header_comparator>& result
327-
);
325+
size_t get_headers(std::map<std::string, std::string, header_comparator>& result) const;
328326
/**
329327
* Method used to get all footers passed with the request.
330328
* @return a map<string,string> containing all footers.

0 commit comments

Comments
 (0)