| 38 | size_t timeout; |
| 39 | |
| 40 | Request::Request(const std::string &h, const TSMBuffer b, const TSMLoc l) : host(h), length(0), io(new ats::io::IO()) |
| 41 | { |
| 42 | assert(!host.empty()); |
| 43 | assert(b != nullptr); |
| 44 | assert(l != nullptr); |
| 45 | assert(io.get() != nullptr); |
| 46 | TSHttpHdrPrint(b, l, io->buffer); |
| 47 | length = TSIOBufferReaderAvail(io->reader); |
| 48 | assert(length > 0); |
| 49 | /* |
| 50 | * TSHttpHdrLengthGet returns the size with possible "internal" headers |
| 51 | * which are not printed by TSHttpHdrPrint. |
| 52 | * Therefore the greater than or equal comparison |
| 53 | */ |
| 54 | assert(TSHttpHdrLengthGet(b, l) >= length); |
| 55 | } |
| 56 | |
| 57 | Request::Request(Request &&that) : host(std::move(that.host)), length(that.length), io(std::move(that.io)) |
| 58 | { |
nothing calls this directly
no test coverage detected