Bug 27036 - Adding the user-agent header to HttpClient object throws a System.FormatException: Invalid format.
Summary: Adding the user-agent header to HttpClient object throws a System.FormatExcep...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Net.Http (show other bugs)
Version: 3.12.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-02-13 05:28 UTC by Prashant Cholachagudda
Modified: 2015-02-13 08:37 UTC (History)
3 users (show)

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


Attachments

Description Prashant Cholachagudda 2015-02-13 05:28:46 UTC
Adding the user-agent header to HttpClient object throws a System.FormatException: Invalid format.

Stacktrace:

System.FormatException: Invalid format.
  at System.Net.Http.Headers.HttpHeaders.AddInternal (System.String name, IEnumerable`1 values, System.Net.Http.Headers.HeaderInfo headerInfo, Boolean ignoreInvalid) [0x00000] in <filename unknown>:0 
  at System.Net.Http.Headers.HttpHeaders.Add (System.String name, IEnumerable`1 values) [0x00000] in <filename unknown>:0 
  at System.Net.Http.Headers.HttpHeaders.Add (System.String name, System.String value) [0x00000] in <filename unknown>:0 
  at Data.Services.PersonService+<CreateSession>c__async0.MoveNext () [0x000ac] in /Users/prashantvc/Desktop items/Xamarin/124040/Xamarin-HTTPS Issue in Sim/Xamarin/Data/Services/PersonService.cs:52 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[Data.Model.VResponse].GetResult () [0x00000] in <filename unknown>:0 
  at Data.ViewModel.LoginViewModel+<>c__async1.MoveNext () [0x00102] in /Users/prashantvc/Desktop items/Xamarin/124040/Xamarin-HTTPS Issue in Sim/Xamarin/Data/ViewModel/LoginViewModel.cs:55 

Test case: https://gist.github.com/prashantvc/d6e8cab1e242b9c22d64
Comment 1 Marek Safar 2015-02-13 08:37:55 UTC
Fixed in master

Note You need to log in before you can comment on or make changes to this bug.