Review Request 127076: kio_http: fix mimetype determination when URL ends with '/'.

Milian Wolff mail at milianw.de
Sun Feb 14 22:02:41 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127076/#review92363
-----------------------------------------------------------


Fix it, then Ship it!





autotests/httpserver_p.h (line 121)
<https://git.reviewboard.kde.org/r/127076/#comment62987>

    move to .cpp, also above and below?



autotests/httpserver_p.h (line 141)
<https://git.reviewboard.kde.org/r/127076/#comment62986>

    const (or static?)



autotests/httpserver_p.cpp (line 95)
<https://git.reviewboard.kde.org/r/127076/#comment62988>

    replace with category based logging?


- Milian Wolff


On Feb. 14, 2016, 6:50 p.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127076/
> -----------------------------------------------------------
> 
> (Updated Feb. 14, 2016, 6:50 p.m.)
> 
> 
> Review request for KDE Frameworks, Dawit Alemayehu and Andreas Hartmetz.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> When no Content-Type is sent by the server, we determine mimetype from
> the URL and the contents. In the switch from KMimeType (which
> took the fileName of the URL) and QMimeDatabase (which takes the full path),
> we hit a difference: if the path ends with '/' then QMimeDatabase
> assumes it's a directory, which isn't the case over HTTP.
> So remove the trailing slash.
> 
> This commit introduces a test harness for kio_http: a basic HTTP server
> running in a separate thread, which I wrote for KDSoap (LGPL).
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt 107263820136c599df84c7beb06a29a1c52898ae 
>   autotests/http_jobtest.cpp PRE-CREATION 
>   autotests/httpserver_p.h PRE-CREATION 
>   autotests/httpserver_p.cpp PRE-CREATION 
>   src/ioslaves/http/http.cpp e1013c8705e6588729d61ed45c43dc564415c41e 
> 
> Diff: https://git.reviewboard.kde.org/r/127076/diff/
> 
> 
> Testing
> -------
> 
> Unit test + watching kio_http debug output in my current work on keditbookmarks favicon support.
> 
> The missing Content-Type is due to another bug, but that's for the next RR.
> 
> 
> Thanks,
> 
> David Faure
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160214/e67ff666/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list