kekewong / 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

Site URL not being escaped properly on Urlcrawlerrorssamples.List call #534

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Issue a Urlcrawlerrorssamples.List passing in a site URL such as 
"http://www.example.com/"

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

Expected request to googleapis.com:

https://www.googleapis.com/webmasters/v3/sites/http%3A%2F%2Fwww.example.com%2F/u
rlCrawlErrorsSamples?key={YOUR_API_KEY}&category=notFound&platform=web

Actual request to googleapis.com:

https://www.googleapis.com/webmasters/v3/sites/http%3A//www.example.com//urlCraw
lErrorsSamples?key={YOUR_API_KEY}&category=notFound&platform=web

Note that the '/'s in the Site URL are not being encoded.

What version of the product are you using? 1.9.1
What is your operating system? Windows server 2008
What is your IDE? VS 2010 Ultimate
What is the .NET framework version? 4.0

Please provide any additional information below.

Because the URL ends up being wrong a 404 (Not Found) is returned.

Original issue reported on code.google.com by bknight...@gmail.com on 5 Mar 2015 at 6:00

GoogleCodeExporter commented 9 years ago
It appears that this only happens with .NET frameworks less than 4.5.  The Uri 
constructor is messing with the encoding.

Original comment by bknight...@gmail.com on 5 Mar 2015 at 11:32