Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

2-legged / Unknown authorization header #386

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Change your regional configuration to spanish
2. Run the sample code at http://code.google.com/p/google-
gdata/source/browse/trunk/clients/cs/samples/OAuth/Program.cs

I would expect the program to run without problems, yet it crashes when it 
executes the query giving an error message indicating "Unknown 
authorization header"

This is with version 1.4.0.2

CAUSE:The problem is in the oauth_timestamp parameter, this has the 
following value: oauth_timestamp="1274154015,57813" (notice the coma).
This is due to the regional configuration of the machine which the code is 
running on.

FIX: I had to add the line 
System.Threading.Thread.CurrentThread.CurrentCulture = 
System.Globalization.CultureInfo.CreateSpecificCulture("en-US");

At the top of the program so that it would not take my regional 
configuration, but rather US configuration.

IMO the library should be "region independant" which can be acomplished by 
incorporating that line into the library.

cheers.

Original issue reported on code.google.com by marcelo.Iturbe on 18 May 2010 at 12:44

GoogleCodeExporter commented 9 years ago
That part is fixed in the source code in subversion for a while, it just did 
not make it into a new setup.

Frank Mantek
Google

Original comment by fman...@gmail.com on 20 May 2010 at 6:40