[GH-ISSUE #451] Incorrect content type? #87

Closed
opened 2026-03-03 12:08:10 +03:00 by kerem · 2 comments
Owner

Originally created by @cgreening on GitHub (Mar 15, 2021).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/451

Thanks for the great library. I'm struggling to get it working with Rails - does anyone have this working?

I think one of the issues I'm seeing is caused by an incorrect content type stopping the ruby library from parsing the responses.

curl -i http://0.0.0.0:4443/storage/v1/b/test
HTTP/1.1 200 OK
Date: Mon, 15 Mar 2021 09:59:42 GMT
Content-Length: 111
Content-Type: text/plain; charset=utf-8

{"kind":"storage#bucket","id":"test","name":"test","versioning":{},"timeCreated":"2021-03-15T09:59:06.41438Z"}
Originally created by @cgreening on GitHub (Mar 15, 2021). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/451 Thanks for the great library. I'm struggling to get it working with Rails - does anyone have this working? I think one of the issues I'm seeing is caused by an incorrect content type stopping the ruby library from parsing the responses. ``` curl -i http://0.0.0.0:4443/storage/v1/b/test HTTP/1.1 200 OK Date: Mon, 15 Mar 2021 09:59:42 GMT Content-Length: 111 Content-Type: text/plain; charset=utf-8 {"kind":"storage#bucket","id":"test","name":"test","versioning":{},"timeCreated":"2021-03-15T09:59:06.41438Z"} ```
kerem 2026-03-03 12:08:10 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@cgreening commented on GitHub (Mar 15, 2021):

I've hacked around with the code and added the correct content type and it fixes my issue with ruby not parsing the response. I'm not a go developer, but I'll try and pull together a pull request with a fix.

<!-- gh-comment-id:799367060 --> @cgreening commented on GitHub (Mar 15, 2021): I've hacked around with the code and added the correct content type and it fixes my issue with ruby not parsing the response. I'm not a go developer, but I'll try and pull together a pull request with a fix.
Author
Owner

@fsouza commented on GitHub (Mar 15, 2021):

Oh interesting, I thought we had the proper content-types, but probably only on download. Should be an easy fix though. Let me know if you have any questions or would prefer me to fix it.

<!-- gh-comment-id:799373662 --> @fsouza commented on GitHub (Mar 15, 2021): Oh interesting, I thought we had the proper content-types, but probably only on download. Should be an easy fix though. Let me know if you have any questions or would prefer me to fix it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#87
No description provided.