Search Issue Tracker

Fixed in 2018.1.X

Fixed in 2017.3.X

Not Reproducible in 2017.1.X, 2017.2.X

Votes

5

Found in

2017.3.0b1

2017.3.0b2

Issue ID

955264

Regression

Yes

WWW request doesn't send Content-Length header

Networking

-

To reproduce:
1. Open attached project;
2. Open "Main" scene;
3. Enter Play mode;
4. Look at the Debug.Log thrown to the Console.

Expected result: WWWForm post request is successful, Content-Length header is not missing.
Actual result: Content-Length header is missing, which used to be auto generated based on the data size:
<html><head><title>Length Required</title></head><body><p>Length Required.</p></body></html>

Reproduced on versions: 2017.3.0b1, 2017.3.0b10, 2018.1.0a5.
Not reproduced on versions: 2017.2.0p2, 2017.3.0a7.

Fixed on: 2018.1.0b1

Comments (13)

  1. ShoalMedia

    Mar 27, 2018 02:10

    you can temp fix by setting `webRequest.chunkedTransfer = false;`

  2. jackalkane

    Feb 07, 2018 04:33

    I just upgraded to the latest Unity version at the same time as upgrading to High Sierra. Didn't have the problem before.

    I set www.chunkedTransfer to false and that resolved this issue. Still having to put this in every place where I call it is tedious.

  3. Yuriy-Ivanov

    Feb 03, 2018 18:36

    See https://en.wikipedia.org/wiki/Chunked_transfer_encoding - chunked transfer doesn't include Content-Length in the HTTP header

  4. Yuriy-Ivanov

    Feb 03, 2018 15:28

    Faced the same issue. Is there any workaround?

  5. whizzkid

    Feb 01, 2018 13:13

    Same for me, unity 2017.3.0p2
    My client can't communicate with the server anymore because the WWW call is using Chunked transfer.

    People, don't forget to VOTE for this issue.

  6. KristoferBoman

    Jan 24, 2018 09:52

    This is still not resolved in Patch 2017.3.0p3. Please re-open this issue!

  7. plasticYoda

    Jan 21, 2018 17:45

    Confirmed to still exist in Patch 2017.3.0p3

  8. plasticYoda

    Jan 21, 2018 16:52

    I just wasted a couple of days on this with my ISP trying to figure out why ModSec was rejecting the POST request. I'm on 2017.3.0f3. Has this been patched?

  9. rgtaylorncsu

    Jan 04, 2018 14:24

    Minimally, this issue should be re-opened so that we can up vote it. This is a major bug that effectively prevents performing an HTTP POST using the WWW class.

    I attempted a workaround: manually setting the Content-Length in the WWW headers, but this results in a "Cannot override system-specified headers" error.

    Please fix this for the 2017.3 branch ASAP or at least give us an ETA on a fix so that we can decide if we need to roll back.

  10. AdrienC

    Dec 28, 2017 19:43

    This bug report was created on sep 30... and it endup in the 2017.3 release on dec 19!
    Something went really bad here!
    Please give us a 2017.3 version with a fix.

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.