Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Fix -r,--header, that was passing headers after CRLF
Browse files Browse the repository at this point in the history
The `-r` or `--header` feature was broken, as headers were sent *after* the last double CRLF.

Since this feature is broken, perhaps it was never used. I suggest we rename `-r` to `-H` to make it more `curl`-like.
  • Loading branch information
abourget committed Nov 7, 2018
1 parent 11c2539 commit b42046e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion programs/cleos/httpc.cpp
Expand Up @@ -198,12 +198,12 @@ namespace eosio { namespace client { namespace http {
request_stream << "content-length: " << postjson.size() << "\r\n";
request_stream << "Accept: */*\r\n";
request_stream << "Connection: close\r\n";
request_stream << "\r\n";
// append more customized headers
std::vector<string>::iterator itr;
for (itr = cp.headers.begin(); itr != cp.headers.end(); itr++) {
request_stream << *itr << "\r\n";
}
request_stream << "\r\n";
request_stream << postjson;

if ( print_request ) {
Expand Down

0 comments on commit b42046e

Please sign in to comment.