HomePhabricator

rpc: Set HTTP Content-Type in bitcoin-cli

Description

rpc: Set HTTP Content-Type in bitcoin-cli

Summary:

We don't set any Content-Type in the client. It is more
consistent with our other JSON-RPC use to set it to application/json.

Note that our server doesn't enforce content types, so it doesn't make a
difference in practice. But it is fairly strange HTTP behavior to not set it.

This came up in #18950.

This is a backport of core#20055

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D10419

Details

Provenance
Wladimir J. van der Laan <laanwj@protonmail.com>Authored on Oct 1 2020, 15:31
PiRKCommitted on Nov 3 2021, 07:07
PiRKPushed on Nov 3 2021, 07:07
Reviewer
Restricted Project
Differential Revision
D10419: rpc: Set HTTP Content-Type in bitcoin-cli
Parents
rABC214964805261: [tests] Replace bytes literals with hex literals
Branches
Unknown
Tags
Unknown