Skip to content

Commit

Permalink
rest.cpp: strip whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschnelli committed May 27, 2015
1 parent 182686c commit 64b8027
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ static bool rest_chaininfo(AcceptedConnection* conn,
{
vector<string> params;
const RetFormat rf = ParseDataFormat(params, strURIPart);

switch (rf) {
case RF_JSON: {
Array rpcParams;
Value chainInfoObject = getblockchaininfo(rpcParams, false);

string strJSON = write_string(chainInfoObject, false) + "\n";
conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
return true;
Expand All @@ -276,7 +276,7 @@ static bool rest_chaininfo(AcceptedConnection* conn,
throw RESTERR(HTTP_NOT_FOUND, "output format not found (available: json)");
}
}

// not reached
return true; // continue to process further HTTP reqs on this cxn
}
Expand Down Expand Up @@ -351,9 +351,9 @@ static bool rest_getutxos(AcceptedConnection* conn,

// parse/deserialize input
// input-format = output-format, rest/getutxos/bin requires binary input, gives binary output, ...

string strRequestMutable = strRequest; //convert const string to string for allowing hex to bin converting

switch (rf) {
case RF_HEX: {
// convert hex to bin, continue then with bin part
Expand Down

0 comments on commit 64b8027

Please sign in to comment.