Bug 123356

Summary: konqueror freezes when the proxy autoconfig URL is a redirect
Product: [Applications] konqueror Reporter: Ralf Hildebrandt <ralf.hildebrandt>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kontakt, malte
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In: 4.6.3
Attachments: The proxy.pac file

Description Ralf Hildebrandt 2006-03-09 22:34:16 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Debian testing/unstable Packages

Our proxy autoconfiguration ULR is http://proxy.charite.de
All browsers except for konqueror and safari can use it; konqueror and safari require to form http://proxy.charite.de/proxy.pac (this is where http://proxy.charite.de redirects to). When these two browsers are configured to use http://proxy.charite.de, they simply freeze.
Comment 1 Ralf Hildebrandt 2006-03-09 22:34:59 UTC
$ wget -S http://proxy.charite.de
--22:34:43--  http://proxy.charite.de/
           => `index.html'
Resolving proxy.charite.de... 160.45.178.69, 160.45.178.70, 192.168.220.201, ...
Connecting to proxy.charite.de|160.45.178.69|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.0 301 Go Away
  Connection: close
  Location: http://proxy.charite.de/proxy.pac
Location: http://proxy.charite.de/proxy.pac [following]
--22:34:43--  http://proxy.charite.de/proxy.pac
           => `proxy.pac'
Connecting to proxy.charite.de|160.45.178.69|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.0 200 OK
  Server: fnord/1.10-2
  Content-Type: application/x-ns-proxy-autoconfig
  Content-Length: 571
  Last-Modified: Thu, 09 Mar 2006 21:34:29 GMT
Length: 571 [application/x-ns-proxy-autoconfig]

100%[====================================>] 571           --.--K/s             

22:34:43 (25.93 MB/s) - `proxy.pac' saved [571/571]
Comment 2 Ralf Hildebrandt 2006-03-09 22:35:52 UTC
Created attachment 15032 [details]
The proxy.pac file
Comment 3 Dr. Kai Schnabel 2006-03-16 09:23:46 UTC
*** This bug has been confirmed by popular vote. ***
Comment 4 Ralf Hildebrandt 2006-07-01 20:23:46 UTC
Still there in 3.5.3
Comment 5 Stefan Borggraefe 2006-07-11 10:55:23 UTC
*** Bug 128267 has been marked as a duplicate of this bug. ***
Comment 6 Malte Cornils 2006-07-29 17:19:11 UTC
I think the code responsible for this behaviour can be found at kdelibs/kio/misc/kpac/downloader.cpp, in method Downloader::download().

KIO::get(url, false, false) is called there, and I suppose that KIO::get() does not follow redirects?

I don't see why not, though. The http kioslave actually supports redirects perfectly. Anyone?

Comment 7 Malte Cornils 2006-07-29 17:40:08 UTC
BTW, Alt-F2 and typing in the (to be rewritten) URL works great and opens up kwrite with the proxy autoconfig script. However, Krun uses the same

KIO::TransferJob *job = KIO::get( m_strURL, false /*reload*/, m_bProgressInfo );

as our code here. *sigh*
Comment 8 Ralf Hildebrandt 2006-12-13 13:52:32 UTC
Still there in 3.5.5
Comment 9 Dawit Alemayehu 2011-04-26 03:59:55 UTC
Git commit 32fffc6767d5f93796c804ea5528e404698a0455 by Dawit Alemayehu.
Committed on 26/04/2011 at 04:06.
Pushed by adawit into branch 'KDE/4.6'.

On redirection, update the proxy script URL so that it avoids a catch-22:
proxy url retreival require a proxy url! Fixes a long long standing bug.

BUG: 123356
FIXED-IN: 4.6.3

M  +9    -2    kio/misc/kpac/downloader.cpp     
M  +1    -0    kio/misc/kpac/downloader.h     

http://commits.kde.org/kdelibs/32fffc6767d5f93796c804ea5528e404698a0455
Comment 10 Dawit Alemayehu 2011-04-26 04:00:40 UTC
Git commit 18de1f67dec3a55bfb9690930fac55996c99252f by Dawit Alemayehu.
Committed on 26/04/2011 at 04:06.
Pushed by adawit into branch 'master'.

On redirection, update the proxy script URL so that it avoids a catch-22:
proxy url retreival require a proxy url! Fixes a long long standing bug.

BUG: 123356
FIXED-IN: 4.6.3
(cherry picked from commit 32fffc6767d5f93796c804ea5528e404698a0455)

M  +9    -2    kio/misc/kpac/downloader.cpp     
M  +1    -0    kio/misc/kpac/downloader.h     

http://commits.kde.org/kdelibs/18de1f67dec3a55bfb9690930fac55996c99252f