Move urlDecode to wallet/rpcwallet.cpp, where it's used #14269

pull Empact wants to merge 1 commits into bitcoin:master from Empact:httpserver changing 4 files +15 −19
  1. Empact commented at 7:31 AM on September 19, 2018: member

    Remove now-unnecessary includes of httpserver.h from bitcoind.cpp and wallet/rpcwallet.cpp.

    Pass decode_plus arg as an int rather than bool, as documented here: http://www.wangafu.net/~nickm/libevent-2.0/doxygen/html/http_8h.html#ac2914389616f04199aded10444fd8e42 https://github.com/libevent/libevent/blob/29cc8386a2f7911eaa9336692a2c5544d8b4734f/http.c#L3182

  2. Move urlDecode to wallet/rpcwallet.cpp, where it's used
    Remove now-unnecessary includes of httpserver.h from bitcoind.cpp and
    wallet/rpcwallet.cpp.
    
    Pass decode_plus arg as an int rather than bool, as documented here:
    http://www.wangafu.net/~nickm/libevent-2.0/doxygen/html/http_8h.html#ac2914389616f04199aded10444fd8e42
    https://github.com/libevent/libevent/blob/29cc8386a2f7911eaa9336692a2c5544d8b4734f/http.c#L3182
    58222ead7e
  3. fanquake added the label Refactoring on Sep 19, 2018
  4. fanquake added the label Wallet on Sep 19, 2018
  5. practicalswift commented at 8:00 AM on September 19, 2018: contributor

    I think we should get rid of evhttp_uriencode and evhttp_uridecode and replace them with project local URI-encode/decode functions. Having them in-tree would make reviewing them easier. Generally I think it is a good idea to minimize the exposure surface to each third-party dependency by limiting the use of more general utility functions that happens to be provided by the dependency (such as evhttp_uriencode and evhttp_uridecode in libevent).

  6. DrahtBot commented at 9:46 AM on September 19, 2018: member

    <!--e57a25ab6845829454e8d69fc972939a-->Note to reviewers: This pull request conflicts with the following ones:

    • #13815 (util: Add [[nodiscard]] to all {Decode,Parse}... functions returning bool by practicalswift)
    • #10973 (Refactor: separate wallet from node by ryanofsky)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  7. laanwj commented at 12:27 PM on September 19, 2018: member

    I tend towards NACK.

    It's intentional that http* more or less wrap libevent_http. This would allow switching to a different HTTP server fairly easily, if that ever becomes necessary.

    Do not spread use of those functions to other files.

  8. laanwj closed this on Sep 19, 2018

  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me