Search Issue Tracker

Fixed in 2017.2.X

Votes

0

Found in

2017.1.0b1

Issue ID

907505

Regression

Yes

UnityWebRequest merges two headers into one when both of them starts with the same sequence of characters

Networking

-

Steps to reproduce:

1) Download attached project 'UnityWebRequestBugTest' and open in Unity
2) Download and install Python 2.7.13
3) Drag and drop 'server.py' file in Python2.7 directory( by default should be in C:\Python27)
'server.py' is a small python server which is included in user's project
4) Double click on 'server.py' to start the server
5) In Unity, open 'BugTest' script and make sure port in the server and script is the same(check attached image 'ports.png')
6) Press Play in Unity
7) Click on 'Send request' button
8) Check Console window, and you will see that both custom headers will be merged in to one(check attached image 'bugRepro.png')
Also error will appear that second custom header is missing (image 'bugRepro.png')

Expected result: Both headers should be detected separately(check attached image 'noRepro.png')
Actual result: Unity merges both headers in to one because both of them starts with the same sequence of characters:
self.send_header("Custom-Header", "abcdef")
self.send_header("Custom-Header-Two", "x")

Reproduced with:
2017.1.0a2, 2017.1.0b4

Not reproduced with:
5.5.3p3, 5.6.0p4

Workaround: rename one of the headers e.g:
self.send_header("Header", "abcdef")
self.send_header("Custom-Header-Two", "x")

---------------------------------------
Fixed in: 2017.1.0p1, 2017.2.0b2

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.