cl.request = make_unique<Request>(Request::parse(cl.in_buf));
string addr_str = cl.sock->get_peer_address().str();
- string::size_type colon = addr_str.find(':');
+ string::size_type colon = addr_str.find(':', (addr_str[0]=='[' ? addr_str.find(']')+1 : 0));
cl.request->set_header("-Client-Host", addr_str.substr(0, colon));
if(cl.request->get_method()!="GET" && cl.request->get_method()!="POST")