Project

General

Profile

Actions

Bug #2471

closed
BN KD

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

Bug #2471: Http::Request::cookies() and Http::Request::getCookieValue() do not work

Added by Boris Nagaev almost 13 years ago. Updated over 12 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

KD Updated by Koen Deforche almost 13 years ago Actions #1

  • 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

KD Updated by Koen Deforche over 12 years ago Actions #2

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom