| 225 | } |
| 226 | |
| 227 | void TBaseServerRequestData::AddHeader(const TString& name, const TString& value) { |
| 228 | HeadersIn_[name] = value; |
| 229 | |
| 230 | if (stricmp(name.data(), "Host") == 0) { |
| 231 | size_t hostLen = strcspn(value.data(), ":"); |
| 232 | if (value[hostLen] == ':') |
| 233 | Port_ = value.substr(hostLen + 1); |
| 234 | Host_ = value.substr(0, hostLen); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | void TBaseServerRequestData::SetPath(TString path) { |
| 239 | Path_ = std::move(path); |
no test coverage detected