x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 (read 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
Product Version: UE 4.8
Tags:
more ▼

asked Jul 03 '15 at 12:40 PM in Bug Reports

avatar image

Fantastic Fox SK
53 2 3 5

avatar image johnson111 Aug 13 '15 at 12:50 AM

I got the same question,have you solved it?

avatar image Fantastic Fox SK Aug 16 '15 at 06:59 PM

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

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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

more ▼

answered Aug 13 '15 at 05:37 PM

avatar image

joeGraf STAFF
1.5k 35 12 67

avatar image Doug E ♦♦ STAFF Aug 14 '15 at 02:24 PM

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

avatar image Fantastic Fox SK Aug 16 '15 at 07:00 PM

Thanks very much!

(comments are locked)
10|2000 characters needed characters left

I modified the source code ,and it works well

more ▼

answered Aug 17 '15 at 01:41 AM

avatar image

johnson111
6 2 2

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question