| 57 | #define HTTP_RELEASE_ASSERT(X) ink_release_assert(X) |
| 58 | |
| 59 | inline void |
| 60 | s_dump_header(HTTPHdr const *hdr, std::string &out) |
| 61 | { |
| 62 | int offset{0}; |
| 63 | int done{0}; |
| 64 | do { |
| 65 | int used{0}; |
| 66 | char b[4096]; |
| 67 | // The buffer offset is taken non-const and it is apparently |
| 68 | // modified in some code path, but in my testing it does |
| 69 | // not change, it seems. Since we manually bump the offset, |
| 70 | // the use of tmp is precautionary to make sure our logic |
| 71 | // doesn't break in case it does change in some circumstance. |
| 72 | int tmp{offset}; |
| 73 | done = hdr->print(b, 4096, &used, &tmp); |
| 74 | offset += used; |
| 75 | out.append(b, used); |
| 76 | } while (0 == done); |
| 77 | } |
| 78 | |
| 79 | inline void |
| 80 | dump_header(DbgCtl const &ctl, HTTPHdr const *hdr, std::int64_t sm_id, std::string_view description) |
no test coverage detected