On Thu, Jul 12, 2012 at 9:09 PM, David Faure <
faure@kde.org> wrote:
> On Wednesday 11 July 2012 11:53:51 Aish Raj Dahal wrote:
>> 1) Case One : When mimetype signal emitted by KIO::TransferJob is used
>>
>> In order to clarify more, let me take an example file
>>
https://github.com/ardahal/kio-learner/blob/ard-dev/metalinkHttp/metalinkHtt
>> p.cpp . The given file uses the mimetype signal (at line 44) to get the
>> headers as soon as the mimetype is emitted. The catch is, since we do
>> no want the redirected HTTP headers but instead want the original HTTP
>> headers, setRedirectionHandlingEnabled has been set to false. This
>> program when run, does not emit the mimetype signal as all, and as a
>> result the qDebugs at line 51 and 52 are never executed . This
>> behavior is seen not only for URLs which redirect (like
>>
http://www.example.com ) but also for URLs which have no redirection
>> (like
http://www.google.com.np) .
>
> This is the part that makes no sense to me ;-)
>
> redirectionHandlingEnabled is a KIO::SimpleJob setting, the slave has no idea
> about that setting. If there's no redirection, then none of the code in
> simplejob that checks for redirectionHandlingEnabled actually runs.
> So it can't possibly make any difference for a URL without redirection.
>
> I think your testcase is a bit wrong:
http://www.google.com.np redirects. I
> can see it in the konqueror debug output:
>
> KonqRun::slotRedirection: KUrl("
http://www.google.com.np") ->
> KUrl("
http://www.google.com.np/")
>
> So if you want to test a URL that doesn't redirect, add the trailing slash
> upfront.
>
> If you can confirm this, then we'll be down to: no http headers emitted when a
> redirection happens, which would be a kio_http issue. Dawit?
>