rust-lang / prev.rust-lang.org

The previous Rust website. The current website's code is at https://github.com/rust-lang/www.rust-lang.org.
https://prev.rust-lang.org
Apache License 2.0
151 stars 340 forks source link

not HTTP 1.1 compliant #190

Open steveklabnik opened 9 years ago

steveklabnik commented 9 years ago

Original issue: https://github.com/rust-lang/rust/issues/8435

Steps to reproduce

  1. Open a TCP connection to rust-lang.org, port 80. (You can use telnet rust-lang.org 80)
  2. Send a request like this:

    GET http://rust-lang.org/ HTTP/1.1
    Host: rust-lang.org
    

    Expected result

Response should be 301 Moved Permanently with the location header set to http://www.rust-lang.org/.

Actual result

HTTP/1.1 302 Found
Date: Sat, 10 Aug 2013 08:00:11 GMT
Server: Apache/2.2.16 (Debian)
X-Powered-By: PHP/5.3.3-7+squeeze16
Location: http://www.rust-lang.orghttp://rust-lang.org/
Vary: Accept-Encoding
Content-Length: 0
Content-Type: text/html

There are two problems with this:

davidalber commented 6 years ago

This still repros. The headers are a little different at this point (e.g., it's not clear that PHP is involved now).

HTTP/1.1 302 Found
Date: Wed, 31 Jan 2018 00:22:52 GMT
Server: Apache
Location: https://www.rust-lang.orghttp://rust-lang.org/
Content-Length: 0
Content-Type: text/html; charset=UTF-8

Are there details on what's running behind rust-lang.org somewhere? Where is the code that handles this request? #170 refers to an NGINX server, although the response headers from rust-lang.org say Apache.

steveklabnik commented 6 years ago

i think but am not sure that it's https://github.com/rust-lang/rust-central-station

gereeter commented 6 years ago

This seems to be fixed for me.