Skip to content

Commit

Permalink
Fixed regression coming from #1290 #1297
Browse files Browse the repository at this point in the history
  • Loading branch information
jansenbe committed Oct 16, 2023
1 parent 40a4e65 commit 1ef7f5d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Admin library: Extra parameters to configure the SharePoint Add-In and Azure ACS principal loading [jansenbe - Bert Jansen]
- Changed `IList.DraftVersionVisibility` to use enum `DraftVisibilityType` instead of an `int` #1286 [jansenbe - Bert Jansen]
- Fixing URL too long issue when downloading files #1290 [koenzomers - Koen Zomers]
- Fixed regression coming from #1290 #1297 [jansenbe - Bert Jansen]

## [1.10.0]

Expand Down
11 changes: 10 additions & 1 deletion src/sdk/PnP.Core/Services/Core/Query/QueryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,16 @@ private static async Task<ApiCallRequest> BuildGetAPICallRestAsync<TModel>(BaseD
// In .NET Framework to ToString() of a NameValueCollection will use HttpUtility.UrlEncodeUnicode under
// the covers resulting in issues. So we decode and encode again as a workaround. This code produces the
// same result when used under .NET5/Core versus .NET Framework
sb.Append($"?{queryString.ToEncodedString()}");

// The base query string can already contain a URL parameter (e.g. _api/Web/getFileByServerRelativePath(decodedUrl=@u)?@u='<server relative url>')
if (baseApiCall.Contains('?'))
{
sb.Append($"&{queryString.ToEncodedString()}");
}
else
{
sb.Append($"?{queryString.ToEncodedString()}");
}
}

// Create ApiCall instance and call the override option if needed
Expand Down

0 comments on commit 1ef7f5d

Please sign in to comment.