- Yiannis Papadomichelakis
- PowerBuilder
- Wednesday, 3 June 2020 02:37 PM UTC
Hi all
I have a small IIS service that has several GET methods and some (in progress) PUT/POST methods.
All my requests have Accept-Encoding: gzip on the header, as pb documentation recommends. This works great on GET methods, however, when I use PUT/POST methods, the response body is not readable.
My WCF POST method has the following attributes:
ResponseFormat = WebMessageFormat.Json
BodyStyle = WebMessageBodyStyle.Bare
When I use HttpClient against IIS/8.5, the response is unreadable. The response headers are the following:
HTTP/1.1 200 OK
Cache-Control: private
Date: Wed, 03 Jun 2020 13:50:55 GMT
Content-Length: 124
Content-Type: application/json; charset=utf-8
Content-Encoding: gzip
Server: Microsoft-IIS/8.5
Vary: Accept-Encoding
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
When I use my local IIS express, the response is readble. The response headers are the following:
HTTP/1.1 200 OK
Cache-Control: private
Date: Wed, 03 Jun 2020 13:58:48 GMT
Content-Length: 2
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-SourceFiles: =?UTF-8?B?QzpcVXNlcnNcbWljaGVsb3Ncc291cmNlXHJlcG9zXEVycFdlYlNydlxMb2dpc21vc0VycFdTXEVycFNydi5zdmNcZW1wXERpc2NvdW50c1xQYXJhbVdpblxDYXRhbG9n?=
X-Powered-By: ASP.NET
If I disable gzip compression, both requests return readable results.
Should I consider this a PB bug or it's expected behavior?
Do you recommend any workaround, except disabling gzip compression?
thanks!
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.