| 999 | } |
| 1000 | |
| 1001 | Result HttpOutgoingMessage::addContentLength(uint64_t value) |
| 1002 | { |
| 1003 | SC_TRY_MSG(not headersSent, "Headers already sent"); |
| 1004 | SC_TRY_MSG(responseHeaders.writtenBytes() != 0, "startResponse or startRequest must be the first call"); |
| 1005 | SC_TRY_MSG(not chunkedTransferEncodingEnabled and not transferEncodingAdded, |
| 1006 | "HttpOutgoingMessage does not support Content-Length with Transfer-Encoding"); |
| 1007 | SC_TRY(responseHeaders.appendContentLength(value, "HttpOutgoingMessage::appendAscii - header space is finished", |
| 1008 | "HttpOutgoingMessage failed formatting Content-Length")); |
| 1009 | contentLengthAdded = true; |
| 1010 | return Result(true); |
| 1011 | } |
| 1012 | |
| 1013 | Result HttpOutgoingMessage::setChunkedTransferEncoding() |
| 1014 | { |
no test coverage detected