Closed lsk569937453 closed 4 months ago
The following is the log of curl without proxy.
* Trying 35.186.224.25:443...
* TCP_NODELAY set
* Trying 2600:1901:1:c36:::443...
* TCP_NODELAY set
* Immediate connect fail for 2600:1901:1:c36::: Network is unreachable
* Connected to accounts.spotify.com (35.186.224.25) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=SE; L=Stockholm; O=Spotify AB; CN=*.spotify.com
* start date: Feb 5 00:00:00 2024 GMT
* expire date: Feb 4 23:59:59 2025 GMT
* issuer: C=US; O=DigiCert Inc; CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5563e5a350e0)
> POST /api/token HTTP/2
> Host: accounts.spotify.com
> user-agent: curl/7.68.0
> accept: */*
> content-type: application/x-www-form-urlencoded
> content-length: 119
>
* We are completely uploaded and fine
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200
< date: Mon, 27 May 2024 03:32:23 GMT
< content-type: application/json
< content-length: 174
< set-cookie: __Host-device_id=AQBR4lDgDz5T3oHzlZeJVWP5D-JrulsPC1UWyvASBWCjD_0Vvh9mcM1VTQuW-qZ68TM8vp6Ik27ylMBccSiy_FS4Gdhf0Rp8v0U;Version=1;Path=/;Max-Age=2147483647;Secure;HttpOnly;SameSite=Lax
< set-cookie: sp_tr=false;Version=1;Domain=accounts.spotify.com;Path=/;Secure;SameSite=Lax
< sp-trace-id: 62fb13682b6b3e1b
< x-envoy-upstream-service-time: 11
< server: envoy
< strict-transport-security: max-age=31536000
< x-content-type-options: nosniff
< vary: Accept-Encoding
< via: HTTP/2 edgeproxy, 1.1 google
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
<
Version List the version(s) of
hyper
, and any relevant hyper dependency (such ash2
if this is related to HTTP/2). hyper = { version = "1.3.1", features = ["full"] } hyper-util = { version = "0.1.4", features = ["full"] } [[package]] name = "h2" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", "http", "indexmap", "slab", "tokio", "tokio-util", "tracing", ]Platform The output of
uname -a
(UNIX), or version and 32 or 64-bit (Windows) windows and linuxDescription I use the client of hyper_util to do the request of http2,and it cause error.But it works well for curl to do the same request .
One way to structure the description:
[short summary of the bug]
I tried this code: [code sample that causes the bug]
I expected to see this happen: [explanation] The curl log is in the following:
Instead, this happened: [explanation]