Something wrong with header parsing in net response

Bug #1631846 reported by Gary.Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
net-cpp
Fix Released
Undecided
Gary.Wang

Bug Description

When implementing ondrive.copy API, the value of the location header provides a URL for a service that will return the current state of the copy operation.E.g
"
HTTP/1.1 202 Accepted
Location: https://onedrive.com/monitor/113jlkjlkjasd1212abcascaf
"

Querying the header's value via the following code
response.header.enumerate([&wrapper](const std::string& key,
                                     const std::set<std::string>& values) {
        for (const auto& v: values) {
            std::cout << "key: " << key <<"value: " << v << std::endl;
        }
});

The results as following:
"
key: Content-Length: 0
value: Content-Length

key: Location: https://api.onedrive.com/v1.0/monitor/3sabmpssppkcg3azgxj63uvwr_3kek-Uznnze3bpj9xeoyvyhzf-4bskzed8ljzsqpa5ea-Kaosno8xhg94wmrcowzfz50qqveam4zhafxgjs2-Xn9ekpmcfwerb7l1lfrlk4dgfdcqrtohn7_hrcpdw
value: Location
"
The key field matches entire header string.
The value filed returns wrong result too.

Related branches

Gary.Wang (gary-wzl77)
Changed in net-cpp:
assignee: nobody → Gary.Wang (gary-wzl77)
status: New → In Progress
Gary.Wang (gary-wzl77)
Changed in net-cpp:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.