#600662 konqueror: passes literal ipv6 address to HTTP CONNECT proxy

Package:
konqueror
Source:
konqueror
Description:
advanced file manager, web browser and document viewer
Submitter:
Jan Braun
Date:
2010-10-18 22:33:05 UTC
Severity:
normal
#600662#5
Date:
2010-10-18 22:29:05 UTC
From:
To:
Hi,
When I try to browse https://www.sixxs.net/ in Konqueror, it issues the
following HTTP CONNECT call to my local http proxy[1]:

| CONNECT 2001:1AF8:1:F006:0:0:0:6:443 HTTP/1.1
| Proxy-Connection: keep-alive
| User-Agent: Mozilla/5.0
| Host: 2001:1AF8:1:F006:0:0:0:6

This fails with

| HTTP/1.1 504 Host 2001:1af8:1:f006:0:0:0:6 lookup failed: Host not found

and Konqueror falls back to IPv4. RFC 2817 says
| The Request-URI portion of the Request-Line is always
| an 'authority' as defined by URI Generic Syntax [RFC 2396]
which I read to mean "IPv6 literals have to be enlosed in square
brackets", and indeed, a telnet session shows polipo honoring the
following:

| CONNECT [2001:1AF8:1:F006:0:0:0:6]:443  HTTP/1.1

However, the IMHO proper solution, which is also what elinks, arora and
iceweasel do, is to pass the hostname on and let the proxy do the
name resolution:

| CONNECT www.sixxs.net:443  HTTP/1.1

This does not only give the proxy more leeway to do its job, it also
prevents DNS information leaks e.g. when using TOR, and it will likely
fix the broken Host: header automatically on the way.

I realize this may not be konqueror's own fault, but of one of its
libraries, please reassign accordingly if so.

regards,
    Jan
[1]
Polipo. Konfigured in konqueror via the environment variables.
And yes, I've messed with konqueror's UA string.