[PR #1947] fix: Make gRPC server work again #1967

Open
opened 2026-03-03 12:37:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/1947
Author: @FoxBuru
Created: 4/2/2025
Status: 🔄 Open

Base: mainHead: fix-grpc-server


📝 Commits (1)

  • 86f5443 fix: Make gRPC server work again

📊 Changes

1 file changed (+23 additions, -3 deletions)

View changed files

📝 main.go (+23 -3)

📄 Description

This PR fixes the handling of gRPC responses, both using TLS (insecure) + plain-text (by including the h2c.NewHandler wrapper on top of it). I've managed to test this with the following grpcurl commands:

grpcurl -d '{"bucket": {"name" : "bucket49"}}' -plaintext localhost:8000 google.storage.v1.Storage.InsertBucket
grpcurl -d '{"bucket": {"name" : "bucket49"}}' -insecure localhost:4443 google.storage.v1.Storage.InsertBucket

In both cases, the response data looks like:

{
  "name": "bucket49"
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/1947 **Author:** [@FoxBuru](https://github.com/FoxBuru) **Created:** 4/2/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-grpc-server` --- ### 📝 Commits (1) - [`86f5443`](https://github.com/fsouza/fake-gcs-server/commit/86f5443019fc6a23f3923904aaaf629f86fd1e13) fix: Make gRPC server work again ### 📊 Changes **1 file changed** (+23 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `main.go` (+23 -3) </details> ### 📄 Description This PR fixes the handling of gRPC responses, both using TLS (insecure) + plain-text (by including the h2c.NewHandler wrapper on top of it). I've managed to test this with the following grpcurl commands: ```shell grpcurl -d '{"bucket": {"name" : "bucket49"}}' -plaintext localhost:8000 google.storage.v1.Storage.InsertBucket ``` ```shell grpcurl -d '{"bucket": {"name" : "bucket49"}}' -insecure localhost:4443 google.storage.v1.Storage.InsertBucket ``` In both cases, the response data looks like: ```json { "name": "bucket49" } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1967
No description provided.