Project

General

Profile

Actions

Bug #1114

closed

Http Client response with multiple Set Cookie headers

Added by Derek Spenser almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/02/2012
Due date:
% Done:

0%

Estimated time:

Description

While processing a response from an Http::Client request, multiple 'Set-Cookie' headers are not properly handled. When there are multiple 'Set-Cookie' headers found within a response, only the last cookie value is preserved; the previous values are overwritten. (Reference: Message::setHeader via Client::handleReadHeaders)

Just thinking through the issue and I thought it would be good to provide a api which separates the cookie from other headers. (Message::Cookie ??) Obviously you would know best and would know how you would like to resolve the issue but multiple 'Set-Cookie' headers should be handled.

Thanks.

Actions #1

Updated by Koen Deforche almost 13 years ago

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

Hey,

You're right. I've fixed this (by having an addHeader() in addition to setHeader()).

Actually, Http::Cookie would be a useful utility class, which could also be used in WApplication::setCookie().

It's hard to draw the line there though, because you could argue that the client should manage the cookies by himself and automatically include a relevant cookie received earlier in a new request ?

Regards,

koen

Actions #2

Updated by Koen Deforche over 12 years ago

  • Status changed from Resolved to Closed

Fixed in 3.2.1

Actions

Also available in: Atom PDF