summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendhttp.h
Commit message (Collapse)AuthorAgeFilesLines
* dav, http: port to libsoup3Daniel Kolesa2022-02-011-10/+6
| | | | | | | | | | | | | 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
* http: Remove use of SoupSessionSync/SoupSessionAsyncChristophe Fergeau2014-07-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Since libsoup 2.42.0, SoupSessionSync/SoupSessionAsync are deprecated, and replaced by direct use of SoupSession as described on https://developer.gnome.org/libsoup/stable/libsoup-session-porting.html This commit removes use of SoupSessionSync/SoupSessionAsync and adjusts the code according to the advice in the doc above: - we only need one SoupSession instance as sync/async calls are made depending on the SoupSession method we use, not depending on the instance type - SoupSession already comes with a SoupProxyResolverDefault, we don't need to add it ourselves - SoupSession already comes with a SoupContentDecoder, we don't need to add it ourselves - SoupSession:use-thread-context is now unused and always set to TRUE, so we don't need to change it To prevent any changes in behavior, we set ssl-strict to FALSE. (Patch updated by Ross Lagerwall) (Reapplying now that #732783 and #732925 have been fixed.) https://bugzilla.gnome.org/show_bug.cgi?id=708306 https://bugzilla.gnome.org/show_bug.cgi?id=732090
* Revert "http: Remove use of SoupSessionSync/SoupSessionAsync"Ross Lagerwall2014-07-171-0/+2
| | | | | | | | This reverts commit 4b76a7e10d76b26929425dc8a392bf0cee246b98. Reverting for now since this has concurrency with libsoup: https://bugzilla.gnome.org/show_bug.cgi?id=732783 https://bugzilla.gnome.org/show_bug.cgi?id=732925
* http: Remove use of SoupSessionSync/SoupSessionAsyncChristophe Fergeau2014-07-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Since libsoup 2.42.0, SoupSessionSync/SoupSessionAsync are deprecated, and replaced by direct use of SoupSession as described on https://developer.gnome.org/libsoup/stable/libsoup-session-porting.html This commit removes use of SoupSessionSync/SoupSessionAsync and adjusts the code according to the advice in the doc above: - we only need one SoupSession instance as sync/async calls are made depending on the SoupSession method we use, not depending on the instance type - SoupSession already comes with a SoupProxyResolverDefault, we don't need to add it ourselves - SoupSession already comes with a SoupContentDecoder, we don't need to add it ourselves - SoupSession:use-thread-context is now unused and always set to TRUE, so we don't need to change it To prevent any changes in behavior, we set ssl-strict to FALSE. (Patch updated by Ross Lagerwall) https://bugzilla.gnome.org/show_bug.cgi?id=708306 https://bugzilla.gnome.org/show_bug.cgi?id=732090
* Unify error conversion in http and dav backendsRoss Lagerwall2014-04-111-1/+1
| | | | | | | Have a single function which converts libsoup error codes to gio error codes rather than one in each backend. https://bugzilla.gnome.org/show_bug.cgi?id=536305
* http: Simplify job failure handlingDan Winship2012-12-181-0/+3
| | | | | | | | | | gvfsbackendhttp defined g_vfs_job_failed_from_http_status(), but didn't export this, so gvfsbackenddav was sort of forced to reimplement it. Fix that by exporting it as http_job_failed(). https://bugzilla.gnome.org/show_bug.cgi?id=687757 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* Update the Address of the FSFFelix Möller2012-07-301-2/+2
| | | | | | | | | | | | | | | Updating the address of the FSF. This has been done by: while read file; do sed -i 's:59 Temple Place:51 Franklin Street:' $file sed -i 's:Suite 330:Fifth Floor:' $file sed -i 's:02111-1307:02110-1301:' $file done https://bugzilla.gnome.org/show_bug.cgi?id=656598 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* http: New function to get the basename without trying to decode itChristian Kellner2011-05-181-0/+2
| | | | | | | | http_uri_get_basename () remained the same and will still encode the resulting basename. http_path_get_basename (), which will be used by the dav backend, will not. Also make sure that in the trailing/leading spaces removal we do not exceed the string boundaries.
* http/dav: Move http_backend_uri_for_filename to dav backendChristian Kellner2011-05-121-5/+0
| | | | | Since we don't need that function in the http backend anymore move it to the dav backend as g_vfs_backend_dav_uri_for_path ().
* http: Add http_backend_get_mount_base ()Christian Kellner2011-05-121-0/+2
| | | | | http_backend_get_mount_base () retrieves the URL of the backends "mount point". URL must not bee freed.
* dav: Fix copying of remote folders to diskChristian Kellner2011-05-041-0/+4
| | | | | | | Do stat() the location, i.e. do a PROPFIND, on open () and correctly report G_IO_ERROR_IS_DIRECTORY for collections instead of trying to fetch (GET) them. Should finally fix bug 551339
* Implement set_display_name. (#525980)Christian Kellner2008-04-031-0/+1
| | | | | | | | | | * daemon/gvfsbackenddav.c: Implement set_display_name. (#525980) With this patch we also do our own redirection handling which alyways allows redirects from /a/b -> /a/b/ (trainling slashes) even for non safe methods. Also some code was cleaned up. svn path=/trunk/; revision=1722
* Correctly set the content types and the icon correclty. (#518679) AlsoChristian Kellner2008-03-061-12/+12
| | | | | | | | | | | | 2008-03-06 Christian Kellner <gicmo@gnome.org> * daemon/gvfsbackenddav.c: Correctly set the content types and the icon correclty. (#518679) Also don't add the If-None-Matcher header for now since early apache versions don't like it. We need to be smart about that later. svn path=/trunk/; revision=1588
* Remove unecessary message_new_from_xxx functions. Prefix all publicChristian Kellner2008-03-031-11/+11
| | | | | | | | | | | | | | | | | | | | 2008-03-03 Christian Kellner <gicmo@gnome.org> * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: Remove unecessary message_new_from_xxx functions. Prefix all public utility functions that need the backend with http_backend_, i.e. rename g_vfs_backend_uri_for_filename() to http_backend_uri_for_filename(). Create http_backend_send_message(), http_backend_queue_message() convenience functions which will pick up the right SoupSession. * daemon/gvfsbackenddav.c: Port to new utility functions and http_backend_xx namespace. Clean up error handling and remove the const keyword from most SoupURI variables. svn path=/trunk/; revision=1515
* Initial take on implementing delete.Christian Kellner2008-02-251-0/+3
| | | | | | | | | | | | | 2008-02-25 Christian Kellner <gicmo@gnome.org> * daemon/gvfsbackenddav.c: Initial take on implementing delete. * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: Add http_error_code_from_status helper function. svn path=/trunk/; revision=1373
* Add a SoupSessionAsync to be used for SoupInputStream doesn't yet workChristian Kellner2008-02-251-0/+2
| | | | | | | | | | | | | 2008-02-25 Christian Kellner <gicmo@gnome.org> * daemon/gvfsbackenddav.c: * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: Add a SoupSessionAsync to be used for SoupInputStream doesn't yet work with SoupSessionSync. Also make sure we share authentication. svn path=/trunk/; revision=1369
* - Port the mount operation to use the sync i/op. - Keep the authChristian Kellner2008-02-251-1/+8
| | | | | | | | | | | | | | | | | | | | 2008-02-25 Christian Kellner <gicmo@gnome.org> * daemon/gvfsbackenddav.c: - Port the mount operation to use the sync i/op. - Keep the auth information around so we can use them again in the case that a subpath requires different authentication. This is needed since libsoup will forgot all auth after a 401. - Ignore trailing slashes in ms_response_is_target (). - Add an initial version of make_directory (). * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: Add message_new_from_filename_full which will add a trailing "/" if is_dir is true. (Saves uneccesary redirects in some cases) Various bits and pieces came from Yann Rouillard. svn path=/trunk/; revision=1368
* Small cleanups.Christian Kellner2008-01-211-0/+1
| | | | | | | | | | | | | 2008-01-21 Christian Kellner <gicmo@gnome.org> * daemon/gvfsbackenddav.c: Small cleanups. * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: Implement query_info for plain http. svn path=/trunk/; revision=1155
* A few cleanups.Christian Kellner2008-01-161-0/+6
| | | | | | | | | | | 2008-01-16 Christian Kellner <gicmo@gnome.org> * daemon/gvfsbackenddav.c: * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: A few cleanups. svn path=/trunk/; revision=1141
* Port to libsoup-2.4.Christian Kellner2008-01-161-2/+2
| | | | | | | | | | | | | | | | | | 2008-01-16 Christian Kellner <gicmo@gnome.org> * daemon/gvfsbackenddav.c: * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: * daemon/soup-input-stream.c: * daemon/soup-output-stream.c: Port to libsoup-2.4. * configure.ac: * daemon/Makefile.am: Make building of http optional (and depend on wether libsoup is found or not) svn path=/trunk/; revision=1139
* Also handle dav uris in the http mapper.Christian Kellner2008-01-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | | 2008-01-13 Christian Kellner <gicmo@gnome.org> * client/httpuri.c: Also handle dav uris in the http mapper. * daemon/dav.mount.in: * daemon/Makefile.am: Add the new dav backend. * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: Implement a utility function so dav and http backend can share uri from filename creation. * daemon/gvfsbackenddav.c: First attempt to write the dav backend as a subclass of http. Mount, QueryInfo, Enumerate should work and Read is provided by the base class. svn path=/trunk/; revision=1116
* Initial attempt of writing the http backend. Not much there yet only aChristian Kellner2008-01-101-0/+50
2008-01-11 Christian Kellner <gicmo@gnome.org> * configure.ac: * daemon/Makefile.am: * daemon/gvfsbackendhttp.c: * daemon/gvfsbackendhttp.h: Initial attempt of writing the http backend. Not much there yet only a stub. svn path=/trunk/; revision=1092