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

Downloading OpenAPI specification from URI using content-encoding: gzip fails #135

Closed
christianhelle opened this issue Sep 4, 2023 · 0 comments · Fixed by #136
Closed
Assignees
Labels
bug Something isn't working

Comments

@christianhelle
Copy link
Owner

Describe the bug
Attempting to download https://developers.intellihr.io/docs/v1/swagger.json results in garbled/binary JSON file being saved.
The file is publicly accessible and does not require auth, so it should be reproducible. I have a similar bug reported to another of my projects

Support Key: ptbddgt

OpenAPI Specifications
https://developers.intellihr.io/docs/v1/swagger.json

Additional context
After making a cURL request to the URI, I found out that that Refitter doesn't support URI's returning content-encoding: gzip

The following command:

curl https://developers.intellihr.io/docs/v1/swagger.json -v

returns:

*   Trying 18.173.5.96:443...
* Connected to developers.intellihr.io (18.173.5.96) port 443 (#0)
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* ALPN: server accepted http/1.1
* using HTTP/1.1
> GET /docs/v1/swagger.json HTTP/1.1
> Host: developers.intellihr.io
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 70281
< Connection: keep-alive
< x-amz-id-2: KbRD1cgNtvruOBsX/Xyxmvcnca3PLvJnb/o2tjFQV9jEBFB8rGareRNv8mj6ub1jd5AX6to/3Y4=
< x-amz-request-id: 898QGBVBFHSY8SNM
< Date: Mon, 04 Sep 2023 09:05:13 GMT
< Last-Modified: Mon, 04 Sep 2023 00:29:47 GMT
< ETag: "614dd1541549b50f0b008444459f94da"
< x-amz-server-side-encryption: AES256
< Content-Encoding: gzip
< x-amz-version-id: SDHILeEo0afGzS0a0a5ljWAToLzlnjWQ
< Accept-Ranges: bytes
< Server: AmazonS3
< Strict-Transport-Security: max-age=15552000; includeSubDomains; preload
< X-Cache: Miss from cloudfront
< Via: 1.1 78a128491ada170a2d9b82ba12d23d7a.cloudfront.net (CloudFront)
< X-Amz-Cf-Pop: CPH50-P1
< X-Amz-Cf-Id: pxEry-q7wwDbWme5LptPbbbMHcKPttbcKbFp4V5LmAIQBOtKNkvMIw==
<
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
* Failure writing output to destination
* Closing connection 0
* schannel: shutting down SSL/TLS connection with developers.intellihr.io port 443
@christianhelle christianhelle added the bug Something isn't working label Sep 4, 2023
@christianhelle christianhelle self-assigned this Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant