Cookies in HttpRequests

Hello,
I’ve been trying to implement HTTP communication with server to be able to query JSON objects form internet, and I think I found a bug. My server sends two 'Set-Cookie: ’ headers. In IHttpRequest exist only function GetHeader which only find first header entry. So I tried to use GetAllHeaders() method and parse it, but it also returned only one 'Set-Cookie: ’ header (the last one… it looks like it’s stored in map and it rewrote the previous ‘Set-Cookie’ key value).

Example:
Http response from curl command-line applicaiton:

Host: localhost:8000
Connection: close
X-Powered-By: PHP/5.6.10
Cache-Control: no-cache
Date: Fri, 03 Jul 2015 11:57:51 GMT
Content-Type: text/html; charset=UTF-8
Set-Cookie: cookie1
Set-Cookie: cookie2

Http response in UE4 ( by GetAllHeaders() method):

Host: localhost:8000
Connection: close
X-Powered-By: PHP/5.6.10
Cache-Control: no-cache
Date: Fri, 03 Jul 2015 11:57:51 GMT
Content-Type: text/html; charset=UTF-8
Set-Cookie: cookie2

GetHeader(“Set-Cookie”) method returns:

cookie2

I got the same question,have you solved it?

It’s a bug. Headers are implemented as a TMap so the second call replaces the first setting. I’ll get it reported

The bug for this has been reported (UE-20017) for investigation.

I am going to wait for it now and work on other aspects of my project.

Thanks very much!

I modified the source code ,and it works well