Skip to content

Commit d3001f4

Browse files
committed
Parse response only when DownloadHandler is DownloadHandlerBuffer
1 parent 5f1ad4c commit d3001f4

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
## [2.5.8] - 2019-09-08
9+
## [2.5.9] - 2019-09-08
1010

1111
### Added
1212
- Add **ParseResponseBody** option to fix severe frame rate drop when parsing large response by [@TigerHix](https://github.com/TigerHix) ([47f8732](https://github.com/proyecto26/RestClient/pull/92/commits/47f8732f3468903779ac85b2dbfbfb12ce7abec1)).
@@ -130,8 +130,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
130130
## [...1.0.1]
131131
Missing tags for previous versions 🤷‍♂
132132

133-
[Unreleased]: https://github.com/proyecto26/RestClient/compare/v2.5.8...HEAD
134-
[2.5.8]: https://github.com/proyecto26/RestClient/compare/2.5.7...v2.5.8
133+
[Unreleased]: https://github.com/proyecto26/RestClient/compare/v2.5.9...HEAD
134+
[2.5.9]: https://github.com/proyecto26/RestClient/compare/2.5.7...v2.5.9
135135
[2.5.7]: https://github.com/proyecto26/RestClient/compare/2.5.5...2.5.7
136136
[2.5.5]: https://github.com/proyecto26/RestClient/compare/2.5.4...2.5.5
137137
[2.5.4]: https://github.com/proyecto26/RestClient/compare/2.5.3...2.5.4

src/Proyecto26.RestClient/Helpers/Common.cs

+1-7
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,7 @@ private static void ConfigureWebRequestWithOptions(UnityWebRequest request, byte
3838
if (options.DownloadHandler is DownloadHandler)
3939
{
4040
request.downloadHandler = options.DownloadHandler;
41-
if (options.DownloadHandler is DownloadHandlerFile
42-
|| options.DownloadHandler is DownloadHandlerTexture
43-
|| options.DownloadHandler is DownloadHandlerAssetBundle
44-
|| options.DownloadHandler is DownloadHandlerAudioClip)
45-
{
46-
options.ParseResponseBody = false;
47-
}
41+
options.ParseResponseBody = (options.DownloadHandler is DownloadHandlerBuffer);
4842
}
4943
else
5044
request.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();

src/Proyecto26.RestClient/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1818
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
1919

20-
[assembly: AssemblyVersion ("2.5.8")]
20+
[assembly: AssemblyVersion ("2.5.9")]
2121

2222
// The following attributes are used to specify the signing key for the assembly,
2323
// if desired. See the Mono documentation for more information about signing.

src/Proyecto26.RestClient/Proyecto26.RestClient.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata>
44
<id>Proyecto26.RestClient</id>
5-
<version>2.5.8</version>
5+
<version>2.5.9</version>
66
<title>RestClient for Unity</title>
77
<authors>Juan David Nicholls Cardona</authors>
88
<owners>jdnichollsc</owners>

src/Proyecto26.RestClient/RestClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Proyecto26
99
{
1010
/// <summary>
1111
/// RestClient for Unity
12-
/// Version: 2.5.8
12+
/// Version: 2.5.9
1313
/// </summary>
1414
public static partial class RestClient
1515
{

0 commit comments

Comments
 (0)