r15282 - in /desktop/unstable/gnome-vfs/debian: changelog patches/90_from_svn_no_range_for_youtube.patch patches/series
slomo at users.alioth.debian.org
slomo at users.alioth.debian.org
Tue Mar 18 20:49:41 UTC 2008
Author: slomo
Date: Tue Mar 18 20:49:41 2008
New Revision: 15282
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=15282
Log:
* debian/patches/90_from_svn_no_range_for_youtube.patch:
+ Patch from upstream SVN to not use the Range header for youtube.com
as it answers with 403 on ranged requests. This fixes the totem
youtube plugin.
Added:
desktop/unstable/gnome-vfs/debian/patches/90_from_svn_no_range_for_youtube.patch
Modified:
desktop/unstable/gnome-vfs/debian/changelog
desktop/unstable/gnome-vfs/debian/patches/series
Modified: desktop/unstable/gnome-vfs/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-vfs/debian/changelog?rev=15282&op=diff
==============================================================================
--- desktop/unstable/gnome-vfs/debian/changelog (original)
+++ desktop/unstable/gnome-vfs/debian/changelog Tue Mar 18 20:49:41 2008
@@ -1,3 +1,12 @@
+gnome-vfs (1:2.22.0-2) unstable; urgency=low
+
+ * debian/patches/90_from_svn_no_range_for_youtube.patch:
+ + Patch from upstream SVN to not use the Range header for youtube.com
+ as it answers with 403 on ranged requests. This fixes the totem
+ youtube plugin.
+
+ -- Sebastian Dröge <slomo at debian.org> Tue, 18 Mar 2008 21:48:32 +0100
+
gnome-vfs (1:2.22.0-1) unstable; urgency=low
* New upstream stable release:
Added: desktop/unstable/gnome-vfs/debian/patches/90_from_svn_no_range_for_youtube.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-vfs/debian/patches/90_from_svn_no_range_for_youtube.patch?rev=15282&op=file
==============================================================================
--- desktop/unstable/gnome-vfs/debian/patches/90_from_svn_no_range_for_youtube.patch (added)
+++ desktop/unstable/gnome-vfs/debian/patches/90_from_svn_no_range_for_youtube.patch Tue Mar 18 20:49:41 2008
@@ -1,0 +1,83 @@
+--- trunk/modules/http-neon-method.c 2008/03/18 15:57:07 5464
++++ trunk/modules/http-neon-method.c 2008/03/18 20:45:39 5465
+@@ -1773,6 +1773,25 @@
+ return GNOME_VFS_OK;
+ }
+
++gboolean
++http_context_host_matches (HttpContext *context, const char *glob)
++{
++ GnomeVFSToplevelURI *uri;
++ GPatternSpec *spec;
++ gboolean res;
++
++ uri = gnome_vfs_uri_get_toplevel (context->uri);
++
++ if (uri == NULL || uri->host_name == NULL || glob == NULL)
++ return FALSE;
++
++ spec = g_pattern_spec_new (glob);
++ res = g_pattern_match_string (spec, uri->host_name);
++ g_pattern_spec_free (spec);
++
++ return res;
++}
++
+ static GnomeVFSResult
+ http_follow_redirect (HttpContext *context)
+ {
+@@ -2255,7 +2274,7 @@
+ hctx = handle->context;
+
+ get_start:
+- req = ne_request_create (hctx->session, "GET", hctx->path);
++ req = ne_request_create (hctx->session, "GET", hctx->path);
+
+ if (handle->use_range) {
+
+@@ -2330,8 +2349,8 @@
+
+ handle->transfer_state = TRANSFER_READ;
+ handle->transfer.read = req;
+- }
+-
++ }
++
+ return result;
+ }
+
+@@ -2347,6 +2366,20 @@
+ return GNOME_VFS_ERROR_INTERNAL;
+ }
+
++/* TRUE means we can range, ie server is sane, FALSE means FAIL */
++static gboolean
++i_can_haz_range_cause_serverz_not_br0ken (HttpContext *hctx)
++{
++ gboolean br0ken = FALSE;
++
++ if (http_context_host_matches (hctx, "*youtube.*")) {
++ DEBUG_HTTP ("Youtube detected! Cannot use ranged gets");
++ br0ken = TRUE;
++ }
++
++ return br0ken == FALSE;
++}
++
+ /* ************************************************************************** */
+
+ static GnomeVFSResult
+@@ -2402,8 +2435,10 @@
+ return result;
+ }
+ } else {
+- /* Always try to make Ranged puts */
+- handle->use_range = TRUE;
++ gboolean use_range = TRUE;
++
++ handle->use_range = i_can_haz_range_cause_serverz_not_br0ken (hctx);
++ DEBUG_HTTP ("Use range: %s\n", use_range ? "on" : "off");
+ }
+
+ result = http_transfer_start (handle);
+
Modified: desktop/unstable/gnome-vfs/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-vfs/debian/patches/series?rev=15282&op=diff
==============================================================================
--- desktop/unstable/gnome-vfs/debian/patches/series (original)
+++ desktop/unstable/gnome-vfs/debian/patches/series Tue Mar 18 20:49:41 2008
@@ -18,4 +18,5 @@
23_improve_volume_labels.patch
24_home_dir_fakeroot.patch
30_nfs4.patch
+90_from_svn_no_range_for_youtube.patch
99_ltmain_as-needed.patch
More information about the pkg-gnome-commits
mailing list