Auto merge of #1848 - arcalinea:replace-bitcoin-in-json-rpc, r=str4d
Replace bitcoin with zcash in rpcprotocol.cpp Not sure if this was intentionally left as bitcoin-json-rpc, but opening a PR for review in case someone wants to ACK and merge.
This commit is contained in:
commit
d4ea4e0e5f
|
@ -33,7 +33,7 @@ const size_t POST_READ_SIZE = 256 * 1024;
|
|||
|
||||
/**
|
||||
* HTTP protocol
|
||||
*
|
||||
*
|
||||
* This ain't Apache. We're just using HTTP header for the length field
|
||||
* and to be compatible with other JSON-RPC implementations.
|
||||
*/
|
||||
|
@ -42,7 +42,7 @@ string HTTPPost(const string& strMsg, const map<string,string>& mapRequestHeader
|
|||
{
|
||||
ostringstream s;
|
||||
s << "POST / HTTP/1.1\r\n"
|
||||
<< "User-Agent: bitcoin-json-rpc/" << FormatFullVersion() << "\r\n"
|
||||
<< "User-Agent: zcash-json-rpc/" << FormatFullVersion() << "\r\n"
|
||||
<< "Host: 127.0.0.1\r\n"
|
||||
<< "Content-Type: application/json\r\n"
|
||||
<< "Content-Length: " << strMsg.size() << "\r\n"
|
||||
|
@ -77,7 +77,7 @@ string HTTPError(int nStatus, bool keepalive, bool headersOnly)
|
|||
if (nStatus == HTTP_UNAUTHORIZED)
|
||||
return strprintf("HTTP/1.0 401 Authorization Required\r\n"
|
||||
"Date: %s\r\n"
|
||||
"Server: bitcoin-json-rpc/%s\r\n"
|
||||
"Server: zcash-json-rpc/%s\r\n"
|
||||
"WWW-Authenticate: Basic realm=\"jsonrpc\"\r\n"
|
||||
"Content-Type: text/html\r\n"
|
||||
"Content-Length: 296\r\n"
|
||||
|
@ -104,7 +104,7 @@ string HTTPReplyHeader(int nStatus, bool keepalive, size_t contentLength, const
|
|||
"Connection: %s\r\n"
|
||||
"Content-Length: %u\r\n"
|
||||
"Content-Type: %s\r\n"
|
||||
"Server: bitcoin-json-rpc/%s\r\n"
|
||||
"Server: zcash-json-rpc/%s\r\n"
|
||||
"\r\n",
|
||||
nStatus,
|
||||
httpStatusDescription(nStatus),
|
||||
|
@ -248,7 +248,7 @@ int ReadHTTPMessage(std::basic_istream<char>& stream, map<string,
|
|||
* JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility,
|
||||
* but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
|
||||
* unspecified (HTTP errors and contents of 'error').
|
||||
*
|
||||
*
|
||||
* 1.0 spec: http://json-rpc.org/wiki/specification
|
||||
* 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
|
||||
* http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx
|
||||
|
|
Loading…
Reference in New Issue