Respected members of the community,<br><br>First of all let me introduce myself. I am a Google Summer of Code 2012 student implementing Metalink/HTTP [RFC 6249] support in Kget. In most basic terms my implementation involves receiving of the custom HTTP response header fields sent by the server supporting Metalink/HTTP. I have been trying to use KIO and extract the information from the custom HTTP response headers sent back by the server, however it has been in vain. <br>



<br>I am using <a href="http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz" target="_blank">http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz</a> to check the Metalink/HTTP. It works fine while running  <br>



<br>curl -sI <a href="http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz" target="_blank">http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz</a><br>



<br>However, while doing so using KIO, I've encountered problems. <br>It seems that the header replies that KIO gets are of the redirected download link, ( the same  as Konqueror gets it while typing the link in the address bar)<br>



However my objective is to prevent the redirection and directly obtain the HTTP header response sent by the server.<br>I have tried with setRedirectionHandlingEnabled(false). But on doing this there is no response and the program gets stuck.<br>



On removing the redirection handling code and setting it to the defaults the redirection presisits.<br><br><br>The output that(with the redirection left to defaults) I get is <br><br>"HTTP/1.1 200 OK                                                                 <br>



server: nginx/0.8.54                                                             <br>date: Fri, 25 May 2012 14:32:56 GMT                                              <br>content-type: application/octet-stream                                           <br>



content-length: 8957266<br>last-modified: Mon, 17 Jan 2011 22:03:15 GMT<br>connection: close<br>accept-ranges: bytes" <br><br>And the output that I should be actually getting is:<br><br>HTTP/1.1 302 Found<br>Date: Fri, 25 May 2012 13:13:14 GMT<br>



Server: Apache/2.2.22 (Linux/SUSE)<br>X-Prefix: <a href="http://49.244.64.0/21" target="_blank">49.244.64.0/21</a><br>X-AS: 23752<br>X-MirrorBrain-Mirror: <a href="http://mirror.averse.net" target="_blank">mirror.averse.net</a><br>


X-MirrorBrain-Realm: region<br>
Link: <<a href="http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz.meta4" target="_blank">http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz.meta4</a>>; rel=describedby; type="application/metalink4+xml"<br>



Link: <<a href="http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz.torrent" target="_blank">http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz.torrent</a>>; rel=describedby; type="application/x-bittorrent"<br>



Link: <<a href="http://mirror.averse.net/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz" target="_blank">http://mirror.averse.net/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz</a>>; rel=duplicate; pri=1; geo=sg<br>



Link: <<a href="http://ftp.isu.edu.tw/pub/OpenOffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz" target="_blank">http://ftp.isu.edu.tw/pub/OpenOffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz</a>>; rel=duplicate; pri=2; geo=tw<br>



Link: <<a href="http://ftp.twaren.net/OpenOffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz" target="_blank">http://ftp.twaren.net/OpenOffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz</a>>; rel=duplicate; pri=3; geo=tw<br>



Link: <<a href="http://ftp.kaist.ac.kr/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz" target="_blank">http://ftp.kaist.ac.kr/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz</a>>; rel=duplicate; pri=4; geo=kr<br>



Link: <<a href="http://mirror.yongbok.net/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz" target="_blank">http://mirror.yongbok.net/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz</a>>; rel=duplicate; pri=5; geo=kr<br>



Digest: MD5=chZROzRjy791zYb5mUhk3A==<br>Digest: SHA=nRgEtguiGxDlu8PKSxyBSc7TlGw=<br>Digest: SHA-256=VO2S9pgCq1lqgTFTKssVj6amn0npNdagtjI8ziDtiRQ=<br>Location: <a href="http://mirror.averse.net/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz" target="_blank">http://mirror.averse.net/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz</a><br>



Connection: close<br>Content-Type: text/html; charset=iso-8859-1<br><br>My "practice" repository is at <a href="https://github.com/ardahal/kio-learner/tree/master/showHttp" target="_blank">https://github.com/ardahal/kio-learner/tree/master/showHttp</a> <br>



<br>I hope you'll go through the code and help me with figuring out how to get the desired result. :)<br><br>Thanks a lot.<br><br>Cheers<br>Aish<br>Google Summer of Code Student 2012<br>