Comment by shakna
2 months ago
The loop most definitely exists. It's rather odd you're not seeing it. Everything I can use to talk to the server gets the 301/302 redirects.
Using yet another machine and curl:
curl -vvv --insecure https://spacejam.com
< HTTP/2 301
< date: Fri, 16 May 2025 10:45:08 GMT
< content-type: text/html; charset=iso-8859-1
< content-length: 233
< location: https://www.spacejam.com/
< server: nginx
< cache-control: max-age=600
< expires: Fri, 16 May 2025 10:51:34 GMT
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.spacejam.com/">here</a>.</p>
</body></html>
...
\* Connection #0 to host www.spacejamanewlegacy.net left intact
curl -vvv --insecure www.spacejamanewlegacy.net
< HTTP/1.1 302 Found
< Date: Fri, 16 May 2025 10:46:53 GMT
< Server: Apache/2.4.62 () OpenSSL/1.0.2k-fips
< X-Powered-By: PHP/8.0.30
< Strict-Transport-Security: max-age=15768000
< Upgrade: h2,h2c
< Connection: Upgrade
< Location: https://www.spacejamanewlegacy.net/
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
\* Connection #0 to host www.spacejam.com left intact
Your request to https://spacejam.com is redirected to https://www.spacejam.com/ .
Your request to http://www.spacejamanewlegacy.net is redirected to https://www.spacejamanewlegacy.net/ .
You never tried making a request to https://www.spacejam.com/ .
Go to https://reqbin.com/ and enter https://spacejam.com . It gives 1 redirect (to https://www.spacejam.com/ ) then HTML.
I think you missed which servers are connected at the end of which request, there.
Reqbin receives an upgrade request to HTTP2, that it never follows.
The curl output you post confuses me. Can you post the full output? The output you posted didn't show a redirect loop. But since you cut out content, maybe there was a redirect loop that I can't see.
Here's my full curl output. No redirect loop:
>Reqbin receives an upgrade request to HTTP2, that it never follows.
You mean Reqbin receives a response with an Upgrade: h2,h2c header? That's not exactly a request to upgrade. That's the server advertising that it supports those protocols for upgrading. The client is free to ignore them. Also, h2 is actually an invalid upgrade protocol, not listed in the standard:
https://www.iana.org/assignments/http-upgrade-tokens/http-up...
https://stackoverflow.com/questions/67583138/why-does-the-ht...
According to that SO post, Apache advertises Upgrade: h2, h2c in its responses, but if the client attempts to upgrade to h2, Apache ignores it. So I believe Reqbin is doing the correct thing in not upgrading to h2. As for upgrading to h2c, that also wouldn't be possible, because that header was sent in response to an https:// request, but h2c only makes sense when upgrading from an http:// request.