| 43 | } |
| 44 | |
| 45 | THttpHeaders::THttpHeaders(IInputStream* stream) { |
| 46 | TString header; |
| 47 | TString line; |
| 48 | |
| 49 | bool rdOk = stream->ReadLine(header); |
| 50 | while (rdOk && !header.empty()) { |
| 51 | rdOk = stream->ReadLine(line); |
| 52 | |
| 53 | if (rdOk && ((line[0] == ' ') || (line[0] == '\t'))) { |
| 54 | header += line; |
| 55 | } else { |
| 56 | AddHeader(THttpInputHeader(header)); |
| 57 | header = line; |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | THttpHeaders::THttpHeaders(TArrayRef<const THttpInputHeader> headers) { |
| 63 | for (const auto& header : headers) { |
nothing calls this directly
no test coverage detected