normally that would never happen, however if kioclient is used (e.g. in
attempt to list https://foo.bar.baz.com as if it is directory) then it
can happen
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
if the slaves do not know what URL is being stat()-ed, listed, etc. then
what? this may make the URL different than the one originally requested (as
it should be) in case of redirection(s) for example
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
as the documentation in CURLE_UPLOAD_FAILED claims - it is usually denied
STORE command and is as close to KIO::ERR_COULD_NOT_WRITE as it gets,
previously KIO::ERR_COULD_NOT_CONNECT was returned for such case
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
so that it does not look like a brute-force attack to servers (multiple
jobs are started for thumbnails and such), less round-trips too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
KRun already had such optimization in place for example, that makes the
file slave kinda special tho as it will determine MIME type only from mode
but the goal is to not even spin a job and a slave for local files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
more accurate probing then before, notably by probing the file content
from the file slave (only the name was checked before because the
filepath was not a full path in some cases and the file could not be
open)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
the specialized one, stat() does it now because emitting MIME type while
also emitting data (in or out) interrupts the data flow
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
can be done by slaves via custom QTextConverter or whatever, the
converter is using Charset metadata and the KRemoteEncoding class is not
required outside the slaves
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
assume there is no metadata if empty, otherwise it is 2x the trip - one
time to check and one time to get the metadata
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
because there are quircks such as slaves emitting total and/or processed
size way too often, the total size may not even be known at the start of
the get (chunked HTTP(s) transfer)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
unfortunate as it is the class for getting protocol information is not
part of kio library so generic..
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
because curl internally checks the environment for proxy-related variables
it is redundant to duplicate that feature, that however is possible due to
the rewrite of the ftp, sftp and http slaves that I did. some other changes
were made while at it such enable automatic resuming by default, if KIO
slaves cannot resume or do not resume transfers that is different thing
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
now that QHostInfo resolves in a more relaxed way (without NI_NAMEREQD
flag) it can happen that the hostname of the result is the address
itself
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
demo.wftpserver.com is one of those, the hack is only for the root
directory anyway and was done to even greater extend by the old ftp
slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>