summaryrefslogtreecommitdiff
path: root/daemon/gvfshttpinputstream.c
Commit message (Collapse)AuthorAgeFilesLines
* dav, http: port to libsoup3Daniel Kolesa2022-02-011-33/+30
| | | | | | | | | | | | | The dav and http backends of the daemon now use libsoup3. Things should work more or less the same as before. One caveat is that the soup session no longer defaults to ssl-strict, so it will no longer silently accept certificates. This does not affect the DAV backend (it has its own handling which is replicated in the soup3 port) but it does affect the http backend. Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/208
* daemon: Don't use deprecated private structure APIsOndrej Holy2018-07-101-23/+20
| | | | | | | g_type_class_add_private and G_TYPE_INSTANCE_GET_PRIVATE have been recently deprecated. Let's use rather G_DEFINE_TYPE_WITH_PRIVATE and _get_instance_private() instead in order to prevent deprecation warnings.
* http: Remove outdated sync methodsOndrej Holy2015-11-261-78/+0
| | | | | | | | Async and sync methods differ one from other. Async methods have more error checking. We don't need the sync methods, because http and dav backends don't use them. Therefor remove the sync methods. https://bugzilla.gnome.org/show_bug.cgi?id=754824
* http: Return error if seek was not successfulOndrej Holy2015-11-261-0/+18
| | | | | | | | | | | | Some webdav servers doesn't implement range requests, which are necessary for a seek support. GVfsHttpInputStream doesn't handle this case. Consequently g_seekable_tell returns a requested offset, however g_input_stream_read returns bytes from a beginning of a file. Return error if Content-Range header field is missing, or the range is not valid. This change is needed to avoid data corruption when reading. https://bugzilla.gnome.org/show_bug.cgi?id=754824
* http: Allow seek past end of fileRoss Lagerwall2013-12-081-0/+8
| | | | | | | Handle a read after a seek past the end of the file by ignoring the requested range not satisfiable http error (416) and simply returning 0. https://bugzilla.gnome.org/show_bug.cgi?id=710534
* http: Fix the SEEK_END offset calculationRoss Lagerwall2013-12-081-1/+3
| | | | | | | Fix the SEEK_END offset calculation by reversing the sign of offset and taking into account the offset of the previous seek. https://bugzilla.gnome.org/show_bug.cgi?id=710534
* http: Ensure the range header is updatedRoss Lagerwall2013-12-081-3/+3
| | | | | | | Ensure that the range header is updated every time ensure_request() is called in case it has been updated. https://bugzilla.gnome.org/show_bug.cgi?id=710534
* http: Fix segfault when seeking on readRoss Lagerwall2013-12-081-1/+2
| | | | | | | | | Previously, the dav backend would segfault when reading after a seek (or also if you did a read_async() without an explicit send()/send_async() first) because the stream from soup_request_send_finish() was not being stored, so store it. https://bugzilla.gnome.org/show_bug.cgi?id=710534
* http: Clean up usage of libsoupRoss Lagerwall2013-10-251-2/+0
| | | | | | | | | | | | | Use libsoup rather than libsoup-gnome since libsoup-gnome is not required anymore. Bump the libsoup requirement to 2.42 to prevent a build failure with old libsoups (undefined references to soup_session_request_uri). Don't include individual libsoup headers as recommended by the libsoup documentation. https://bugzilla.gnome.org/show_bug.cgi?id=587890
* http: Replace deprecated SoupRequester by SoupSessionOndrej Holy2013-08-221-6/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702624
* Fix compiler warningsBastien Nocera2013-04-021-2/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=695834
* http: replace SoupInputStream with SoupRequestDan Winship2012-12-181-0/+586
Replace the hacky SoupInputStream with a new GVfsHttpInputStream that is a wrapper around SoupRequest. (We need a wrapper stream rather than just using SoupRequest directly because we want the stream here to be seekable, which requires cancelling and re-sending the HTTP request and getting a new underlying stream.) The http and dav backends still use both a sync and an async SoupSession, even though this is no longer necessary, since changing this would require a lot of rewriting of code that currently works. https://bugzilla.gnome.org/show_bug.cgi?id=687757 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>