I’ve run into an issue with ProxyFeature, because the Core (1.0.43) version doesn’t return Content-Length.
For example, if you go to your core demo, http://imgur.netcore.io/, the headers are:
HTTP/1.1 200 OK
Server: nginx/1.11.3
Date: Wed, 05 Jul 2017 20:23:06 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Last-Modified: Sat, 06 May 2017 09:03:36 GMT
Vary: Accept
X-Powered-By: ServiceStack/1.041 NETStandard/.NET
On the 4.5 demo, http://imgur.servicestack.net/, they are:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Last-Modified: Thu, 30 Jun 2016 18:28:20 GMT
Vary: Accept
Server: Microsoft-IIS/8.5
X-Powered-By: ServiceStack/4.50 Win32NT/.NET
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 05 Jul 2017 20:22:52 GMT
Content-Length: 3798
Content-length is missing in the core one.
This causes a problem in ProxyService because in this line
it passes the value to the underlying NetCoreResponse, but it’s zero (or -1), which causes an exception.
So, should there be content-length being returned? And/or should ProxyService handle zero or missing content lengths?