You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the response message has some kind of encoding (i.e. gzip or some other encoding specified by Content-Encoding or Transfer-Encoding headers), then this content is NOT decoded and the raw encoded bytes will be returned.
If the content is gzipped (for example), this will cause the JSON decoding to fail.
Using the getBody() method of Zend\Http\Response, instead of getContent(), will properly decode the body.
This issue probably exists in other clients, too.
Note: I am seeing this issue when using the Google client to authenticate with Salesforce (they use the same parameter names-- I override the endpoints via config), which returns plaintext JSON responses in most cases, but a gzipped encoded JSON response when exchanging an authorization_code.
The text was updated successfully, but these errors were encountered:
I have the same problem with Facebook. getContent return somthing like that "�Л�\000\000\000\000\000\000� ОKrГ \000@o╙╡Кh║╚�0��QLЪi╙A�╤┌�?Ш▒Ю╛�р}ДФjЪ╛э│SfO�"т�8�;>Fщеу�\000°{aъЬwyQ▄8в├╡Ь╩Qv╗┘ЦЬ�Q╟ззfьс�яея�ЩШх╒оЩП╛8�їа9n╬#╟B�:;�/╔ZїяM6�╓л�┌╤)э{ы█╡А┼_┘VkФ╫щуЎВБLдЫ%z[�R�9�л�амШ[ЛЕbsсщ╦�[N6√ч╕Х�ОMl@v╖��╕X>ъС�Кx─г7╡Їэиж=tC▀�ю?S��УЎ\000\000\000" But if use getBody i have "access_token=CAACaX60aB04BAJUkZC335lUYeSLkLNNdZAPqXOsOrck8utOZCnabHRofYYm132vfgZAnHYLQ8huM4aEMfqfZBhSrZBae3Pu0ZBxIzQp9hKuqt2bIPkPsJppt4tzN5NyOiQzDLbJmdv56cIc1KIfZC36J4A00ZBfj5cQY1baxPBnEY7RW27iZCrZBTrgZA6ZBnHn3Kgtc56BNxFbrZCPAZDZX&expires=5174231"
On line 52 of ReverseOAuth2/Client/Google.php, the call to getContent() returns the raw content of the response message.
If the response message has some kind of encoding (i.e. gzip or some other encoding specified by Content-Encoding or Transfer-Encoding headers), then this content is NOT decoded and the raw encoded bytes will be returned.
If the content is gzipped (for example), this will cause the JSON decoding to fail.
Using the getBody() method of Zend\Http\Response, instead of getContent(), will properly decode the body.
This issue probably exists in other clients, too.
Note: I am seeing this issue when using the Google client to authenticate with Salesforce (they use the same parameter names-- I override the endpoints via config), which returns plaintext JSON responses in most cases, but a gzipped encoded JSON response when exchanging an authorization_code.
The text was updated successfully, but these errors were encountered: