diff options
| author | Jonas Schnelli <[email protected]> | 2014-11-20 14:04:16 +0100 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2014-11-26 13:42:58 +0100 |
| commit | 210eba9fdb9b4ed28ab0b9dcdbcaf45209a143b4 (patch) | |
| tree | ceb94188f2a839ea8ce034bc83c807aaf309f3d7 /src/rest.cpp | |
| parent | Merge pull request #5323 (diff) | |
| download | discoin-210eba9fdb9b4ed28ab0b9dcdbcaf45209a143b4.tar.xz discoin-210eba9fdb9b4ed28ab0b9dcdbcaf45209a143b4.zip | |
[REST] fix headersonly flag for BINARY responses
Diffstat (limited to 'src/rest.cpp')
| -rw-r--r-- | src/rest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rest.cpp b/src/rest.cpp index 122b36171..1aa864a30 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -100,7 +100,7 @@ static bool rest_block(AcceptedConnection *conn, switch (rf) { case RF_BINARY: { string binaryBlock = ssBlock.str(); - conn->stream() << HTTPReply(HTTP_OK, binaryBlock, fRun, true, "application/octet-stream") << binaryBlock << std::flush; + conn->stream() << HTTPReplyHeader(HTTP_OK, fRun, binaryBlock.size(), "application/octet-stream") << binaryBlock << std::flush; return true; } @@ -148,7 +148,7 @@ static bool rest_tx(AcceptedConnection *conn, switch (rf) { case RF_BINARY: { string binaryTx = ssTx.str(); - conn->stream() << HTTPReply(HTTP_OK, binaryTx, fRun, true, "application/octet-stream") << binaryTx << std::flush; + conn->stream() << HTTPReplyHeader(HTTP_OK, fRun, binaryTx.size(), "application/octet-stream") << binaryTx << std::flush; return true; } |