| 147 | } |
| 148 | |
| 149 | void |
| 150 | header(TSMBuffer b, TSMLoc l) |
| 151 | { |
| 152 | if (!getHeader(b, l, "Content-Type", contentType_)) { |
| 153 | getHeader(b, l, "content-type", contentType_); |
| 154 | } |
| 155 | |
| 156 | { |
| 157 | std::string contentLengthValue; |
| 158 | |
| 159 | if (!getHeader(b, l, "Content-Length", contentLengthValue)) { |
| 160 | getHeader(b, l, "content-length", contentLengthValue); |
| 161 | } |
| 162 | |
| 163 | if (!contentLengthValue.empty()) { |
| 164 | std::stringstream ss(contentLengthValue); |
| 165 | uint32_t contentLength = 0; |
| 166 | ss >> contentLength; |
| 167 | Dbg(dbg_ctl, "Content-Length: %i", contentLength); |
| 168 | content_.reserve(contentLength); |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | void |
| 174 | timeout() const |
no test coverage detected