Description

when curl requests are redirected (301) – response headers are merged together and are comma separated.  but, Content-Type headers are required to use semi-colon ";" separators.

 

Steps to Reproduce

majoriy of this came from:

  • [Link Removed]

 

Create a new C++ blank project

  • In Content Browswer, click Add New
  • Select New C++ Class...
  • Select Actor, click Next
  • Name new Actor: HttpActor
  • Click Create Class

visual studio should be starting up

  • you can close editor for now...

 

edit Project/Source/Project/Project.Build.cs

  • change from:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
  • to: (basically, add the Http module)
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Http" });

 

replace HttpActor.h and HttpActor.cpp with the ones attached to this JIRA.

 

build C++ project game from visual studio (if you've closed the editor)

  • back in editor, click on compile button (if this was not done with visual studio)

 

add HttpActor to screen – to see the actor you may need to:

  • click on content folder icon
  • click arrow next to C++ classes
  • and then click on your project

drag and drop HttpActor to scene

 

fire up the 2 python web servers (also attached to this JIRA):

  • in a command prompt, type:
python page1.py
  • in another command prompt, type:
python page2.py

ensure test.json is also in the same folder as these two python scripts.

 

back in editor, click play – look in the output window to see that there's only one set of Content-Type

if you see "Connection refused" in the output window, ensure the python commands are still running.

or else, you should see a line that shows:

Content-type: application/json

and not:

Content-type: text/html; charset=utf-8, application/json

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-67368 in the post.

0
Login to Vote

Fixed
ComponentUE - Online
Affects Versions4.21
Target Fix4.22
Fix Commit4679198
Main Commit4806726
Release Commit4862694
CreatedDec 7, 2018
ResolvedJan 3, 2019
UpdatedOct 28, 2022