Bug 52711 - Content-Length header is missing when using NSUrlSessionHandler
Summary: Content-Length header is missing when using NSUrlSessionHandler
Status: RESOLVED DUPLICATE of bug 52682
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.4 (C9)
Hardware: PC Windows
: --- blocker
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-02-23 18:05 UTC by Ruben Buniatyan
Modified: 2017-02-28 21:48 UTC (History)
5 users (show)

Tags: Cycle9R
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 52682

Description Ruben Buniatyan 2017-02-23 18:05:02 UTC
# Steps to reproduce
Simply post a JSON with HttpClient with NSUrlSessionHandler .

# Expected behavior
HttpClient with NSUrlSessionHandler should set Content-Length header on POST as before

# Actual behavior
HttpClient with NSUrlSessionHandler doesn't set Content-Length header on POST. Transfer-Encoding set to Chunked.

# Supplemental info (logs, images, videos)
C9 release doesn't seem to be backward compatible as none of my requests works. Is there some parameter to restore the previous behavior?

# Test environment (full version information)
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-90150-00969-AA868
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-90150-00969-AA868
Microsoft Visual Basic 2015

Visual C# 2015   00322-90150-00969-AA868
Microsoft Visual C# 2015

Visual C++ 2015   00322-90150-00969-AA868
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package   7.18.00214.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.21111.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.8.1   14.0.11123.0
Azure App Service Tools v2.8.1

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2016.3.2    Build 107.0.20170126.120331
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

Merq   1.1.14-alpha (21c13c9)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft .NET Core Tools (Preview 2)   14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.61021.0
Microsoft SQL Server Data Tools

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Xamarin   4.3.0.784 (73f58d6)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.1.0.41 (9578cdc)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.4.0.123 (35d1ccd)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Andrew 2017-02-24 16:03:23 UTC
confirmed.  post and put are failing with the NSUrlSessionHandler.  I will add another bug but this is related or the same error.
Comment 2 Andrew 2017-02-24 16:07:29 UTC
ref new bug: 

https://bugzilla.xamarin.com/show_bug.cgi?id=52750

like the bug says the Content-length is 0.
Comment 3 Sebastien Pouliot 2017-02-24 22:20:23 UTC
We believe this to be a duplicate of #52682 which has a test case.

If your test case differs from it then please attach it to the bug report so we can make sure it's tested and integrated in our regression tests. Thanks!

*** This bug has been marked as a duplicate of bug 52682 ***