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

bug: upload more than 4096 bytes of grpc proto content and report an error #820

Closed
tom2nonames opened this issue Nov 8, 2019 · 2 comments

Comments

@tom2nonames
Copy link
Contributor

上传 gRpc proto 内容超过4096个字节报错

Environment

  • apisix version : 0.8
  • OS: CentOS 7.6

Minimal test code / Steps to reproduce the issue

  1. shell cmd
curl http://127.0.0.1:9080/apisix/admin/proto/1 -X PUT -d 'xxxxxxxxx len=4311'
  1. error message
{"error_msg":"invalid configuration: property \"content\" validation failed: string too long, expected at most 4096, got 4311"}
  1. code
_M.proto = {
    type = "object",
    properties = {
        content = {
            type = "string", minLength = 1, maxLength = 4096
        }
    },
    required = {"content"},
    additionalProperties = false,
}

希望 proto内容的尺寸上限改为一个合理的值.

@nic-chen
Copy link
Member

nic-chen commented Nov 8, 2019

I think we could increase the maxLength to 1M, since ETCD's default max-request-bytes is 1.5M

@moonming moonming changed the title bug: 上传 gRpc proto 内容超过4096个字节报错 bug: upload more than 4096 bytes of grpc proto content and report an error Nov 9, 2019
@membphis
Copy link
Member

membphis commented Nov 9, 2019

PR welcome

tom2nonames added a commit to tom2nonames/incubator-apisix that referenced this issue Nov 11, 2019
membphis pushed a commit that referenced this issue Nov 28, 2019
…oding. (#846)

* bugfix: Adjust the MaxLength parameter in grpc proto from 4096b to 1M (#820)
* change: grpc-transcode plugins add schema check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants