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

NuGetVersion: adds application/xml to request accept header #1383

Merged

Conversation

seburgi
Copy link

@seburgi seburgi commented Sep 19, 2016

When trying to get the current version of a NuGet package from a private Artifactory NuGet source, we got the following exception:

System.Net.WebException: The remote server returned an error: (406) Not Acceptable.
    at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
    at System.Net.WebClient.DownloadString(Uri address)
    at System.Net.WebClient.DownloadString(String address)
    at Fake.NuGetVersion.getLastNuGetVersion(String server, String packageName) in C:\code\fake\src\app\FakeLib\NuGet\NugetVersion.fs:line 55

It turned out that Artifactory (as of version 4.2.1) does not support the NuGet json format.
Adding "application/xml" to the accept header of the request, fixes this problem.

@forki
Copy link
Member

forki commented Sep 19, 2016

thx

@forki forki merged commit ea02780 into fsprojects:master Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants