Mobile app version of vmapp.org
Login or Join
Si4351233

: Http2 and Alternate-Protocol, ngnix open src web server config My goal is to know if my android app and my browser are talking to my web server on http2. Using open source nginx stable 1.12

@Si4351233

Posted in: #Http #Https

My goal is to know if my android app and my browser are talking to my web server on http2. Using open source nginx stable 1.12 on linux.

Looking at the network or other tools of firefix (version 54) or chrome (version 59) can we tell that ?

Response Headers I get on hitting sub domain (like a.my.com/):
Date: Thu, 13 Jul 2017 11:02:06 GMT
Last-Modified: Wed, 12 Apr 2017 14:46:01 GMT
Connection: keep-alive
Etag: "58ee3da9-264"
Server: WebServer
Strict-Transport-Security: max-age=63072000
x-frame-options: DENY
X-Content-Type-Options: nosniff
Cache-Control: no-cache
Alternate-Protocol: 443:npn-spdy/3


But when I hit a page (https://a.my.com/b/c/) the last header is not returned. My app hits a page like that.
Response Headers:

Date: Thu, 13 Jul 2017 11:11:13 GMT
Content-Type: application/json
Content-Length: 235
Connection: keep-alive
Access-Control-Allow-Headers: origin, content-type, accept, authorization
access-control-allow-credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
Vary: Accept-Encoding
Content-Encoding: gzip
Server: WebServer
x-frame-options: SAMEORIGIN


Does the client browser hit the base URL to get the protocol anyway without logging it? (I opened a reopened my browser and tried in a private window, to hit the page first, still did not see the Protocol info).

Just curious if its a config thing/ if it matters or trust the clients to use the best protocol without changing anything on the server or android app code?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

2 Comments

Sorted by latest first Latest Oldest Best

 

@Debbie626

From Stephen Ostermiller:
nginx log file. I know that Apache logs the HTTP version of every request. I'd assume that nginx does that, or can be configured to do that.

10% popularity Vote Up Vote Down


 

@Margaret670

I've uploaded the script bellow to a server with nginx/1.10.0 and it correctly identified Chrome (http2) and Curl (I know my curl works in http1.1)

<?php
echo $_SERVER["SERVER_PROTOCOL"];
?>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme