Gin v1.9.1 with go1.21.2 on Centos8 and Debian11 (Google Cloud VM instance) - Server-side push issue

63 views Asked by At

I am facing an issue with gin on Centos8 and on Debian11 (Google Cloud VM instance). Not sure whether it is gin issue or go issue or os issue or network issue ...

This works fine, I get HTTP/2 in the output message for curl -I ... ...

[GIN] 2023/10/08 - 05:49:29 | 404 |     184.381µs |     98.33.79.20 | HEAD     "/api/associations/get"

However, this fails for curl ... (that is, without the -I option) ...

Failed to push: feature not supported
[GIN] 2023/10/08 - 05:49:55 | 200 |      119.21µs |     98.33.79.20 | GET      "/api/associations/get"

Any idea what could be going wrong?

Here's server-side log for request from curl ...

 . Request.Header: map[Accept:[*/*] User-Agent:[curl/8.2.1]]
 . Failed to push: feature not supported
[GIN] 2023/10/09 - 00:29:34 | 200 |     106.951µs |     98.33.79.20 | GET      "/api/associations/get"

Here's server-side log for request from chrome ...

 . Request.Header: map[Accept:[text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7] Accept-Encoding:[gzip, deflate, br] Accept-Language:[en-US,en;q=0.9] Cache-Control:[max-age=0] Sec-Ch-Ua:["Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117"] Sec-Ch-Ua-Mobile:[?0] Sec-Ch-Ua-Platform:["macOS"] Sec-Fetch-Dest:[document] Sec-Fetch-Mode:[navigate] Sec-Fetch-Site:[none] Sec-Fetch-User:[?1] Upgrade-Insecure-Requests:[1] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36]]
 . Failed to push: feature not supported
[GIN] 2023/10/09 - 00:28:43 | 200 |     165.912µs |     98.33.79.20 | GET      "/api/associations/get"

NOTE: Works with Firefox and httpie and postman ...

 . Request.Header: map[Accept:[text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8] Accept-Encoding:[gzip, deflate, br] Accept-Language:[en-US,en;q=0.5] Dnt:[1] Sec-Fetch-Dest:[document] Sec-Fetch-Mode:[navigate] Sec-Fetch-Site:[cross-site] Sec-Gpc:[1] Te:[trailers] Upgrade-Insecure-Requests:[1] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/118.0]]
[GIN] 2023/10/09 - 00:28:28 | 200 |     420.227µs |     98.33.79.20 | GET      "/api/associations/get"
[GIN] 2023/10/09 - 00:28:28 | 200 |   10.307439ms |     98.33.79.20 | GET      "/assets/app.js"
 . Request.Header: map[Accept:[*/*] Accept-Encoding:[gzip, deflate] Connection:[keep-alive] User-Agent:[HTTPie/3.0.2]]
[GIN] 2023/10/09 - 00:38:18 | 200 |      92.935µs |     98.33.79.20 | GET      "/api/associations/get"
 . Request.Header: map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Postman-Token:[b77c5987-8228-4584-a486-9a0f3f748f77] User-Agent:[PostmanRuntime/7.32.3]]
[GIN] 2023/10/09 - 00:55:08 | 200 |     189.142µs |     98.33.79.20 | GET      "/api/associations/get"

I am using go1.21.2 and gin v1.9.1

Thanks

0

There are 0 answers