sawanmishra / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

Invalid cast exception /w .NET Framework 2.0 RTM #273

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a request to a Uri containing '%2F' ("/" character)
2. When building the request 
Google.Apis.Requests.UriSlashUnescapeWorkaround.Modify method will get invoked.
3. This method will cause an invalid cast on early .NET Framework 2.0 versions 
e.g. the RTM version 2.0.50727.42

What is the expected output? What do you see instead?

Correctly alter the flags without causing an exception.

What version of the product are you using? On what operating system?

As of 11/20/2012 the issue still seems to be present in 
google-api-dotnet-client according to the source.
The affected user's computer had .NET Framework 2.0.50727.42, Windows XP.

Please provide any additional information below.

UriSlashUnescapeWorkaround.Modify method assumes that the underlying type for 
Uri.Flags (which is the type of Uri.m_Flags's field) is ulong.
However, this was not always true - in the the early .NET 2.0 versions it was 
apparently an int (but then more flags probably needed to be added and the type 
was expanded)

The method should handle both underlying types. The attached diff does just 
that. Feel free to use it.

Original issue reported on code.google.com by li...@grafnetr.com on 20 Nov 2012 at 12:45

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,
Thanks heaps for tracking this down, unfortunately I need you to sign a 
contributors licence agreement before I can look at your code. See 
http://code.google.com/p/google-api-dotnet-client/wiki/BecomingAContributor , 
the form can be submitted electronically. Sorry to put a hurdle in front of 
your contributions. If you update this issue once you have filled that in, I 
will then look at your code.

Sorry once more,
David.

Original comment by davidwat...@google.com on 27 Nov 2012 at 5:21

GoogleCodeExporter commented 9 years ago
Hello David,
no problem. I've submitted the CLA.

Best,
Libor

Original comment by li...@grafnetr.com on 28 Nov 2012 at 3:29

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 10 May 2013 at 9:00

GoogleCodeExporter commented 9 years ago
We stopped supporting .NET 2.0 form version 1.4.0-beta
As a result I'm closing this issue.

Original comment by pele...@google.com on 11 Dec 2013 at 1:05