Package: apache2
Version: 2.2.9-10
Severity: normal
Tags: ipv6

When accessing a server with a rewrite line like

  RewriteRule ^/?$ /foo/ [R=302]

with an [ipv6 address] like so:

  http://[::1]/

the server issues a false Location header and HTML content:

  piper:/etc/apache2/sites-enabled% curl --globoff -D- http://[::1]             
                  #6,10049
  HTTP/1.1 302 Found
  Date: Thu, 19 Nov 2009 00:11:34 GMT
  Server: Apache/2.2.14 (Debian)
  Location: http://::1/foo/
  Content-Length: 272
  Content-Type: text/html; charset=iso-8859-1

  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  <html><head>
  <title>302 Found</title>
  </head><body>
  <h1>Found</h1>
  <p>The document has moved <a href="http://::1/foo/";>here</a>.</p>
  <hr>
  <address>Apache/2.2.14 (Debian) Server at ::1 Port 80</address>

The client correctly sends the

  Host: [::1]

header, but the server ignores that.

This works fine with the Redirect* directives, it seems.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


-- 
 .''`.   martin f. krafft <madd...@d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)

Reply via email to