[BUG] Wrong URL parsing fc::url

Open
#185 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
networking

Research direction

Reproduce the issue with the exact fc::url("http://nsqd-nodeos:4151/pub?topic=eos_actions") input and inspect the fc::url parsing entry point. Done means the path remains /pub and the query and args expose topic=eos_actions instead of being empty.

Written by the indexing model from the issue text.

Description

Seems like bug after providing correct url as std::string fc::url wrong parsing it and trim until path.

auto m_url = fc::url("http://nsqd-nodeos:4151/pub?topic=eos_actions");
ilog("URL string: ${str}", ("str", m_url)); http://nsqd-nodeos:4151/pub - incorrect
ilog("Url path: ${p}", ("p", m_url.path())); /pub - correct
ilog("Url query: ${q}", ("q", m_url.query())); empty - incorrect
ilog("Url args: ${r}", ("r", m_url.args())); empty
Dominant language
C++
Stars
39
Forks
93
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EOSIO/fc

All issues in EOSIO/fc

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.