http2

Decoding http2 frame header/data in Go

巧了我就是萌 提交于 2019-12-25 03:18:04
问题 I am trying to read from a tcp connection which contains HTTP/2 data. Below is the code for reading HEADERS frame - framer := http2.NewFramer(conn, conn) frame, _ := framer.ReadFrame() fmt.Printf("fh type: %s\n", frame.Header().Type) fmt.Printf("fh type: %d\n", frame.Header().Type) fmt.Printf("fh flag: %d\n", frame.Header().Flags) fmt.Printf("fh length: %d\n", frame.Header().Length) fmt.Printf("fh streamid: %d\n", frame.Header().StreamID) headersframe := (frame1.(*http2.HeadersFrame)) fmt

Enable HTTP/2 on WCF and Web API

北城余情 提交于 2019-12-24 23:04:07
问题 I tried to enable the HTTP/2 on my IIS 10. i used this tutorial in order to do that. after enabling HTTP/2 i tested my server with various clients and even online websites like these: https://http2.pro https://tools.keycdn.com/http2-test all result indicates that server supports the HTTP/2. when i log the request with my IIS i can see the protocol version is 2 but when i log the request on my application (wcf and web api) it shows HTTP/1.1!! now i wonder what is the problem? do i miss

Why is my site not using http/2 while it is http/2 enabled

北城余情 提交于 2019-12-24 20:26:27
问题 I have a NGINX reverse proxy in front of a website. The NGINX server is http2/ready. If I run a test, all seems good: However, when I go to the website using a browser, chrome indicates the website is using http/1.1. I can't figure out why. Can anyone help? 回答1: I found out why. I enabled the TLS 1.3 protocol on NGINX. Chrome 70 on Win10 handshaked to TLS 1.3 without http/2. As soon as I disabled TLS 1.3 the browser handshaked to TLS1.2 + https/2. The question, of course, is what is faster. I

HTTP2 push with nginx?

有些话、适合烂在心里 提交于 2019-12-24 14:18:32
问题 I install nginx 1.13.10 with a wordpress site and openssl on my virtual machine. I'm trying to test http2 push. Here is my nginx conf file: pastebin.com/71ziXeRh server { listen 80 default_server; listen [::]:80 default_server; server_name 192.168.133.21; return 302 https://$server_name$request_uri; } # Load configuration files for the default server block. server { listen 443 ssl http2; server_name 192.168.133.21; include conf.d/self-signed.conf; #ssl config ssl on; location / { root /var

HTTP2 / SPDY Push-Stream Verification: How to Test?

半城伤御伤魂 提交于 2019-12-24 13:40:24
问题 I am implementing HTTP2/SPDY push resourcing using the node module spdy. I have followed indutny's doc and have been doing test runs implementing his example into my server.js. The problem is two fold; I am not getting any errors in the log(s) nor am I seeing the alert in the browser. I don't see any change in the Developers Console as well. If I set a bogus push URL, I get no response/errors,etc. I believe in theory, the Priority should change from medium to High (?). See Screen shoot. Is

Why netty http2 server always use odd number for streamId

自古美人都是妖i 提交于 2019-12-24 09:51:17
问题 I am using Netty to setup a simple http/2 server. I am using this example as http/2 server. To test this server, I am using netty example client. My client code where I am sending the request to server: Complete code : http://netty.io/5.0/xref/io/netty/example/http2/client/package-summary.html HttpResponseHandler responseHandler = initializer.responseHandler(); int streamId = 3; HttpScheme scheme = SSL ? HttpScheme.HTTPS : HttpScheme.HTTP; AsciiString hostName = new AsciiString(HOST + ':' +

Does OkHttp support HTTP/2 server push?

两盒软妹~` 提交于 2019-12-24 08:34:29
问题 I am developing an Android video streaming application using the OkHttp library and HTTP/2. I am investigating the possibility of using the server push functionality of the HTTP/2 protocol, but I am not sure whether OkHttp supports it or not. I have a basic server implementation to test HTTP/2 push, which works without problems on the chrome browser (i.e., pushed content is stored in the cache and retrieved from the cache by the browser). When I use the Android application with the OkHttp

PHP: Get HTTP Protocol Version (HTTP/1.1 vs HTTP/2)

和自甴很熟 提交于 2019-12-24 01:26:00
问题 Until now my php application assumed HTTP 1.1 everywhere. So I defined all headers like so: header("HTTP/1.1 500 Internal Server Error"); But now my server also supports HTTP 2 and I want to update all header responses with the right HTTP status code. How to I get the HTTP Protocol version of the http request? (My webserver is nginx, but I guess it is irrelevant if I am using nginx or apache.) 回答1: The server protocol should be available through SERVER_PROTOCOL from the server environment,

How to configure Netty 4 HTTP/2 client to get individual frames

谁说胖子不能爱 提交于 2019-12-24 00:03:23
问题 I'm writing a Netty based HTTP/2 service that does "server sent events" (SSE) and I need to write a HTTP/2 test client class for use in integration tests, but I'm having hard time working out how to set up my client pipeline so that I can get individual events from the server. I first tried using the HTTP/1.1 ↔ HTTP/2 adapter classes ( InboundHttp2ToHttpAdapter + HttpToHttp2ConnectionHandler ) but with this combo I only got the FullHttpResponse after the stream was closed, not the individual

Is there a “request” like package using http2?

放肆的年华 提交于 2019-12-23 23:24:50
问题 We are using request at work. We now have access to http2 for our server to server requests. Do you know any node package with the same api (ish) as request that uses http2 ? 回答1: I faced the same problem and couldn't find a module. This isn't a good solution but you can hack the request module to add http2. As no one has chipped in with a better answer it's worth a mention. This is what I did: Add http2 as a boolean to the options object passed into request . In node_modules/request run: npm