Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

After receiving HTTP 500 for the first request, the client starts sending requests without an upgrade header #460

Open
p-himik opened this issue Dec 31, 2024 · 0 comments

Comments

@p-himik
Copy link
Contributor

p-himik commented Dec 31, 2024

My WS handler for GET:

(fn [req]
  (println "returning HTTP 500")
  (clojure.pprint/pprint (:headers req))
  (res/status 500))

Cleaned-up logged data:

returning HTTP 500
{"origin"                   "http://localhost:8000",
 "host"                     "localhost:8000",
 "upgrade"                  "websocket",
 "user-agent"               "...",
 "cookie"                   "...",
 "connection"               "Upgrade",
 "pragma"                   "no-cache",
 "sec-websocket-key"        "...",
 "accept-language"          "en-US,en;q=0.9",
 "sec-websocket-version"    "13",
 "accept-encoding"          "gzip, deflate, br, zstd",
 "sec-websocket-extensions" "permessage-deflate; client_max_window_bits",
 "cache-control"            "no-cache"}

returning HTTP 500
{"sec-fetch-site"     "same-origin",
 "x-requested-with"   "XMLHTTPRequest",
 "sec-ch-ua-mobile"   "?0",
 "host"               "localhost:8000",
 "user-agent"         "...",
 "cookie"             "...",
 "sec-ch-ua"          "...",
 "sec-ch-ua-platform" "\"Linux\"",
 "referer"            "...",
 "connection"         "keep-alive",
 "x-csrf-token"       "test-csrf-token",
 "accept"             "*/*",
 "accept-language"    "en-US,en;q=0.9",
 "sec-fetch-dest"     "empty",
 "accept-encoding"    "gzip, deflate, br, zstd",
 "sec-fetch-mode"     "cors"}

[all the following logged headers are identical]

In the initial description of the issue, I formulated it as "the client spams the server", but it was just a dev-time configuration in effect where the retry time is a small constant.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants