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

Review Request #127076 - Created Feb. 14, 2016 and submitted

Information
David Faure
kio
master
cbbd3d2...
Reviewers
kdeframeworks
adawit, ahartmetz
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).

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.

Issues

  • 1
  • 2
  • 0
  • 3
Description From Last Updated
replace with category based logging? Milian Wolff Milian Wolff
Milian Wolff
David Faure
David Faure
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 30711f47cb716e8abe9f71f5be1367ec178eea9d by David Faure to branch master.
Loading...