#482 HTTPResponse doesn't like Amazon EC2 cookies

closed
nobody
Net (141)
5
2012-09-14
2011-11-21
Richard Offer
No

I'm trying to build a client that uses the Amazon EC2 Query API.

The Cookie handler in Poco uses "Set-Cookie" as the header (while looking for any cokkies in the response, while Amazon EC2 uses "Set-cookie" - this means that no cookies are extracted from the response.

I'm not making any comments about whether EC2 is correct or not - but they do have size on their side.

Discussion

  • Since Amazon isn't likely to fix their end of things ;-), here's a fix for POCO.
    Fix is also in SVN 1.4.3, rev. 1687

    ==== //poco/1.4/Net/src/HTTPRequest.cpp#1 - /ws/poco-1.4/Net/src/HTTPRequest.cpp ====
    41a42

    include "Poco/String.h"

    154c155
    < while (it != end() && it->first == COOKIE)


    while (it != end() && Poco::icompare(it->first, COOKIE) == 0)
    ==== //poco/1.4/Net/src/HTTPResponse.cpp#1 - /ws/poco-1.4/Net/src/HTTPResponse.cpp ====
    45a46

    include "Poco/String.h"

    203c204
    < while (it != end() && it->first == SET_COOKIE)


    while (it != end() && Poco::icompare(it->first, SET_COOKIE) == 0)