Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul of MediaDownloader: simpler, handles Content-Encoding: gzip #723

Merged
merged 2 commits into from
Apr 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Src/Support/GoogleApis.Auth.DotNet4.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<packages>
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="NUnit" version="2.6.3" targetFramework="net45" />
<package id="NUnit" version="3.2.1" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
6 changes: 3 additions & 3 deletions Src/Support/GoogleApis.Auth.Tests/OAuth2/BearerTokenTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void AuthorizationHeaderAccessMethod_GetAccessToken()
var request = new HttpRequestMessage();
request.Headers.Authorization = new AuthenticationHeaderValue("a", "1");
var accessToken = new BearerToken.AuthorizationHeaderAccessMethod().GetAccessToken(request);
Assert.IsNullOrEmpty(accessToken);
Assert.That(accessToken, Is.Null.Or.Empty);

request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "abc");
accessToken = new BearerToken.AuthorizationHeaderAccessMethod().GetAccessToken(request);
Expand Down Expand Up @@ -81,12 +81,12 @@ public void QueryParameterAccessMethod_GetAccessToken()
// No query parameter at all.
var request = new HttpRequestMessage(HttpMethod.Get, new Uri("https://sample.com"));
var accessToken = new BearerToken.QueryParameterAccessMethod().GetAccessToken(request);
Assert.IsNullOrEmpty(accessToken);
Assert.That(accessToken, Is.Null.Or.Empty);

// Different query parameter.
request = new HttpRequestMessage(HttpMethod.Get, new Uri("https://sample.com?a=1"));
accessToken = new BearerToken.QueryParameterAccessMethod().GetAccessToken(request);
Assert.IsNullOrEmpty(accessToken);
Assert.That(accessToken, Is.Null.Or.Empty);

// One query parameter and it's access_token.
request = new HttpRequestMessage(HttpMethod.Get, new Uri("https://sample.com?a=1&access_token=abc"));
Expand Down
2 changes: 1 addition & 1 deletion Src/Support/GoogleApis.Auth.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<packages>
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="NUnit" version="2.6.3" targetFramework="net45" />
<package id="NUnit" version="3.2.1" targetFramework="net45" />
</packages>
4 changes: 2 additions & 2 deletions Src/Support/GoogleApis.Core/Apis/Util/UriPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ namespace Google.Apis.Util
// As a class library, we can't control app.config or the entry assembly, so we can't take
// either approach. Instead, we resort to reflection trickery to try to solve these problems
// if we detect they exist. Sorry.
internal static class UriPatcher
public static class UriPatcher
{
internal static void PatchUriQuirks()
public static void PatchUriQuirks()
{
var uriParser = typeof(System.Uri).Assembly.GetType("System.UriParser");
if (uriParser == null) { return; }
Expand Down
Loading