Project

General

Profile

Actions

Bug #2471

closed

Http::Request::cookies() and Http::Request::getCookieValue() do not work

Added by Boris Nagaev over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
11/27/2013
Due date:
% Done:

0%

Estimated time:

Description

Hello!

Http::Request::cookies() and Http::Request::getCookieValue() do not work always return empty result.

Test case attached.

Output:

Cookies: WtTestCookie=ok; test=test

Number of cookies: 0

Number of cookies is expected to return 2.

getCookieValue() returns 0 for any argument.

Best Regards,

Boris Nagaev


Files

r.cpp (926 Bytes) r.cpp Boris Nagaev, 11/27/2013 11:40 PM
Actions #1

Updated by Koen Deforche over 10 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche
  • Target version set to 3.3.2

Hey,

That's indeed a bug in Wt. As a workaround, you can call the following function in Wt::Http::Request to parse the "Cookie" header into a map:

   static void parseCookies(const std::string& cookie,
                std::map<std::string, std::string>& result);

I've fixed this in my working copy.

Regards,

koen

Actions #2

Updated by Koen Deforche about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF