Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Minimal v2 protocol fixes #387
Conversation
dnfclas
added
the
cla-already-signed
label
Mar 17, 2016
emgarten
commented on an outdated diff
Mar 17, 2016
....Core/NuGet.Protocol.Core.v3/HttpSource/HttpSource.cs
| @@ -171,6 +172,19 @@ public HttpSource(PackageSource source, Func<Task<HttpHandlerResource>> messageH | ||
| } | ||
| } | ||
| + public Task<HttpResponseMessage> GetAsync(Uri uri, MediaTypeWithQualityHeaderValue[] accept, ILogger log, CancellationToken token) | ||
| + { | ||
| + var request = new HttpRequestMessage(HttpMethod.Get, uri); | ||
| + foreach (var a in accept) | ||
| + { | ||
| + request.Headers.Accept.Add(a); | ||
| + } | ||
| + | ||
| + Func<HttpRequestMessage> requestFactory = () => request; |
|
|
emgarten
commented on the diff
Mar 17, 2016
...RemoteRepositories/RemoteV2FindPackageByIdResource.cs
| @@ -126,6 +127,7 @@ private Task<IEnumerable<PackageInfo>> EnsurePackagesAsync(string id, Cancellati | ||
| // So we decide to leave current logic and observe. | ||
| using (var data = await _httpSource.GetAsync( | ||
| uri, | ||
| + new[] { new MediaTypeWithQualityHeaderValue("application/atom+xml"), new MediaTypeWithQualityHeaderValue("application/xml") }, |
emgarten
Contributor
|
|
|
johnataylor
merged commit 7f8b4c1
into
dev
Mar 18, 2016
alpaix
deleted the
minimal-v2-protocol-fixes branch
Jul 20, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
johnataylor commentedMar 17, 2016
@yishaigalatzer
This pull request represents the minimal working changes for Klondike.
@csharpfritz
We are also expecting users to have to use Klondike with host/api/odata and not host/api because for 3.4 because we are not fixing the fact that we don't correctly processes odata base address. If the initial request is redirected our client won't work because the base address specified in the root OData ServiceDocument will not be picked up.