server {
    listen 80;
    server_name www.pythontest.net;
    root /srv/python-testdata/www/;

    location = /redir/ {
      return 302 $scheme://$host/elsewhere$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name self-signed.pythontest.net;

    ssl_certificate /srv/python-testdata/tls/self-signed-cert.pem;
    ssl_certificate_key /srv/python-testdata/tls/self-signed-key.pem;
}

server {
    listen 80;
    server_name www.pythontest.net;
    root /srv/python-testdata/www/;

    location = /redir/ {
      return 302 $scheme://$host/index.html;
    }
}

server {
    listen 443 ssl;
    server_name self-signed.pythontest.net;

    ssl_certificate /srv/python-testdata/tls/self-signed-cert.pem;
    ssl_certificate_key /srv/python-testdata/tls/self-signed-key.pem;
}

Revert "make redirect use request_uri"
Revert "make redirect use request_uri"

This reverts commit 60384364e8a87a7dd540370c086cba6028b847f3.
