ngx GRPC错误无法解析HTTP / 2预期的'P'80在字节0处获得'O'79

问题描述

我有一台运行良好的GRPC服务器(使用BloomrPC测试)。我有一个使用Angular和ngx-grpc构建的前端。从grpc客户端发送请求时,服务器端出现Followin错误。知道是什么问题吗?

import os
print(os.O_RDWR)  # 2 - in binary 10
print(os.O_Trunc)  # 512 - in binary 1000000000
flags = os.O_RDWR | os.O_Trunc  # does bitwise OR to set the flags
print(flags)  # 514 - in binary this is 1000000010

if flags & os.O_RDWR:
    print("O_RDWR is set")  # this print is executed because the 2s digit is set

解决方法

我知道了。我想问题是我对ngx-grpc的工作原理缺乏了解。 我的grpc服务器希望收到http / 2请求,但是ngx-grpc正在发送http / 1.1请求。所以我必须为此运行特使代理。现在通讯正常。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...