http2

How to find out why Nginx return 400 while use it as http/2 load balancer?

杀马特。学长 韩版系。学妹 提交于 2021-02-20 04:56:54
问题 I'm implementing a http/2 proxy myself, and I'm using Nginx as load balancer. When I use Nginx as h2c load balancer, it works: server { listen 8443 http2; location / { error_log /Users/jiajun/nginx_error_log.log debug; grpc_pass grpc://127.0.0.1:2017; } } Run it: $ go run example/grpc_client/main.go calling to 127.0.0.1:2019 2019/01/28 11:50:46 gonna call c.SayHello... 2019/01/28 11:50:46 Greeting: Hello world And Nginx access log is: 127.0.0.1 - - [28/Jan/2019:11:50:46 +0800] "POST

Why is the request event being fired twice

有些话、适合烂在心里 提交于 2021-02-11 12:33:55
问题 I have a server which looks like this: const http2 = require('http2'); const { HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS, HTTP2_HEADER_CONTENT_TYPE } = http2.constants; const fs = require('fs'); const server = http2.createSecureServer({ key: fs.readFileSync('./ssl/localhost-privkey.pem'), cert: fs.readFileSync('./ssl/localhost-cert.pem') }); server.on('error', (err) => { console.error(err); }); server.on('stream', (stream, headers,flags) => { stream.respond({ 'content-type':

Istio: How to modify the h2UpgradePolicy globally?

笑着哭i 提交于 2021-02-11 04:42:07
问题 I want up upgrade all incoming http 1.1 connections to http2 in Istio. I understand how to achieve this via destination rules for a particular namespace and pod. However, I want to upgrade all connections in service mesh from http1.1 too http2. Even the documentation recommends this, if Istio sidecar is auto injected here. if sidecar is installed on all pods in the mesh, then this should be set to UPGRADE. Can I update the "istio" ConfigMap under "Istio-system" namespace? If yes, what would

Istio: How to modify the h2UpgradePolicy globally?

扶醉桌前 提交于 2021-02-11 04:40:14
问题 I want up upgrade all incoming http 1.1 connections to http2 in Istio. I understand how to achieve this via destination rules for a particular namespace and pod. However, I want to upgrade all connections in service mesh from http1.1 too http2. Even the documentation recommends this, if Istio sidecar is auto injected here. if sidecar is installed on all pods in the mesh, then this should be set to UPGRADE. Can I update the "istio" ConfigMap under "Istio-system" namespace? If yes, what would

OkHttp keeps getting StreamResetException: stream was reset: INTERNAL_ERROR when it's 200

你离开我真会死。 提交于 2021-02-10 16:23:58
问题 I got StreamResetException: stream was reset: INTERNAL_ERROR from OkHttp. What's the problem? Here's the logs. I/okhttp.OkHttpClient: <-- 200 https://www.example.com/user/list (396ms) I/okhttp.OkHttpClient: date: Fri, 04 Dec 2020 02:21:35 GMT I/okhttp.OkHttpClient: content-type: application/json I/okhttp.OkHttpClient: content-length: 99730 I/okhttp.OkHttpClient: server: nginx/1.18.0 I/okhttp.OkHttpClient: allow: GET, HEAD, OPTIONS I/okhttp.OkHttpClient: x-frame-options: DENY I/okhttp

OkHttp keeps getting StreamResetException: stream was reset: INTERNAL_ERROR when it's 200

微笑、不失礼 提交于 2021-02-10 16:22:18
问题 I got StreamResetException: stream was reset: INTERNAL_ERROR from OkHttp. What's the problem? Here's the logs. I/okhttp.OkHttpClient: <-- 200 https://www.example.com/user/list (396ms) I/okhttp.OkHttpClient: date: Fri, 04 Dec 2020 02:21:35 GMT I/okhttp.OkHttpClient: content-type: application/json I/okhttp.OkHttpClient: content-length: 99730 I/okhttp.OkHttpClient: server: nginx/1.18.0 I/okhttp.OkHttpClient: allow: GET, HEAD, OPTIONS I/okhttp.OkHttpClient: x-frame-options: DENY I/okhttp

Java 9 HttpClient hangs

断了今生、忘了曾经 提交于 2021-02-07 12:30:15
问题 I'm experimenting with HTTP/2 client from jdk 9-ea+171 . The code is taken from this example: HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(new URI("https://www.google.com/")) .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandler.asString()); But the client hangs on the last line forever. Please advice how to fix it? Debugging shows it infinitely waits in method waitUntilPrefaceSent() . 回答1: This is a bug

Chrome net::ERR_HTTP2_PROTOCOL_ERROR 200 after a reconnect

时光怂恿深爱的人放手 提交于 2021-02-07 09:37:58
问题 I'm using Node server with an express app which handles a Server Sent Events stream. This is proxied via NginX with http2 enabled. The SSE events are consumed via EventSource in a React app. I'm sending a heartbeat message every 10 seconds to keep the connection alive. This all works great until there is some form of network interruption such as putting my laptop to sleep then re-awaking it. Then from that point on the stream will error every 40 or so seconds with the net::ERR_HTTP2_PROTOCOL

Chrome net::ERR_HTTP2_PROTOCOL_ERROR 200 after a reconnect

社会主义新天地 提交于 2021-02-07 09:37:33
问题 I'm using Node server with an express app which handles a Server Sent Events stream. This is proxied via NginX with http2 enabled. The SSE events are consumed via EventSource in a React app. I'm sending a heartbeat message every 10 seconds to keep the connection alive. This all works great until there is some form of network interruption such as putting my laptop to sleep then re-awaking it. Then from that point on the stream will error every 40 or so seconds with the net::ERR_HTTP2_PROTOCOL

How to make calls to HTTP2 on Xamarin.Forms

只谈情不闲聊 提交于 2021-02-06 21:34:55
问题 gRpc for Xamarin.Forms with .Net Standart 2.0 works on http2, so it should be some way to make HttpClient calls or reuse existing gRpc functionality. It could be that i missing something. Sample app to reproduce issue. You need to host gRpc service somewhere. WebClient call is in AboutPage.xaml.cs aslo test project with asp core 3.1 in web folder. XamarinHttp2WithBackend GitHub Fallowing instructions Microsoft.com - HttpClient Stack and SSL/TLS Implementation Selector for Android and