UniValue: don't escape solidus, keep espacing of reverse solidus #6339

Merged
merged 1 commit into from Jun 25, 2015

Conversation

Projects
None yet
5 participants
@jonasschnelli
Member

jonasschnelli commented Jun 24, 2015

After the JSON RFC, solidus ('/') must not be escaped (https://www.ietf.org/rfc/rfc4627.txt see paragraph 2.5)

JSON spirit did not escape a solidus.

Escaping the solidus character made things look bad in bitcoin-cli (or possibly over other RPC clients).

Example:
Before this PR:
http:\/\/127.0.0.1:8332

After this PR:
http://127.0.0.1:8332

@luke-jr

This comment has been minimized.

Show comment
Hide comment
@luke-jr

luke-jr Jun 24, 2015

Member

utACK

Member

luke-jr commented Jun 24, 2015

utACK

@theuni

This comment has been minimized.

Show comment
Hide comment
@theuni

theuni Jun 24, 2015

Member

I believe univalue/gen.cpp needs to be updated and run to re-generate this, no? I assume you just hand-edited this, but we should still ensure that it's still producing correct output.

Member

theuni commented Jun 24, 2015

I believe univalue/gen.cpp needs to be updated and run to re-generate this, no? I assume you just hand-edited this, but we should still ensure that it's still producing correct output.

@jgarzik

This comment has been minimized.

Show comment
Hide comment
@jgarzik

jgarzik Jun 25, 2015

Contributor

Yes @theuni is correct.

Contributor

jgarzik commented Jun 25, 2015

Yes @theuni is correct.

@laanwj laanwj added the RPC/REST/ZMQ label Jun 25, 2015

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 25, 2015

Member

utACK

Member

laanwj commented Jun 25, 2015

utACK

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Jun 25, 2015

Member

@theuni: Meh. Thanks! Wasn't aware of that. Fixed the gen.cpp file, gcc gen.cpp, ./a.out > univalue_escapes.h. The resulted file gave no changes to my manually edited file. The updated gen.cpp is now also included in this PR.

Member

jonasschnelli commented Jun 25, 2015

@theuni: Meh. Thanks! Wasn't aware of that. Fixed the gen.cpp file, gcc gen.cpp, ./a.out > univalue_escapes.h. The resulted file gave no changes to my manually edited file. The updated gen.cpp is now also included in this PR.

@jgarzik

This comment has been minimized.

Show comment
Hide comment
@jgarzik

jgarzik Jun 25, 2015

Contributor

ut ACK

Contributor

jgarzik commented Jun 25, 2015

ut ACK

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Jun 25, 2015

Member

Added covering for this escaping issue in univalue_tests.cpp.

Member

jonasschnelli commented Jun 25, 2015

Added covering for this escaping issue in univalue_tests.cpp.

@laanwj laanwj merged commit 77aeb7c into bitcoin:master Jun 25, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Jun 25, 2015

Merge pull request #6339
77aeb7c UniValue: don't escape solidus, keep espacing of reverse solidus (Jonas Schnelli)

@str4d str4d referenced this pull request in zcash/zcash Feb 14, 2017

Merged

Bitcoin 0.12 RPC PRs 1 #2100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment