rpms/libsoup/F-12 0001-Don-t-change-HEAD-to-GET-on-303-redirect.patch, NONE, 1.1 libsoup.spec, 1.103, 1.104
Bastien Nocera
hadess at fedoraproject.org
Thu Nov 5 16:42:11 UTC 2009
Author: hadess
Update of /cvs/pkgs/rpms/libsoup/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15913
Modified Files:
libsoup.spec
Added Files:
0001-Don-t-change-HEAD-to-GET-on-303-redirect.patch
Log Message:
* Thu Nov 05 2009 Bastien Nocera <bnocera at redhat.com> 2.28.1-2
- Fix hangs when playing hi-def YouTube videos
0001-Don-t-change-HEAD-to-GET-on-303-redirect.patch:
libsoup/soup-session.c | 10 ++++++----
tests/redirect-test.c | 8 +++++---
2 files changed, 11 insertions(+), 7 deletions(-)
--- NEW FILE 0001-Don-t-change-HEAD-to-GET-on-303-redirect.patch ---
>From fd0433d5a04b7d973ef01bfd4f711122728a4db4 Mon Sep 17 00:00:00 2001
From: Dan Winship <danw at gnome.org>
Date: Thu, 5 Nov 2009 11:15:38 -0500
Subject: [PATCH] Don't change HEAD to GET on 303 redirect
https://bugzilla.gnome.org/show_bug.cgi?id=600830
---
libsoup/soup-session.c | 10 ++++++----
tests/redirect-test.c | 7 +++++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index 44a4476..8fb28ec 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -882,10 +882,12 @@ redirect_handler (SoupMessage *msg, gpointer user_data)
!SOUP_METHOD_IS_SAFE (msg->method)) ||
(msg->status_code == SOUP_STATUS_MOVED_PERMANENTLY &&
msg->method == SOUP_METHOD_POST)) {
- /* Redirect using a GET */
- g_object_set (msg,
- SOUP_MESSAGE_METHOD, SOUP_METHOD_GET,
- NULL);
+ if (msg->method != SOUP_METHOD_HEAD) {
+ /* Redirect using a GET */
+ g_object_set (msg,
+ SOUP_MESSAGE_METHOD, SOUP_METHOD_GET,
+ NULL);
+ }
soup_message_set_request (msg, NULL,
SOUP_MEMORY_STATIC, NULL, 0);
soup_message_headers_set_encoding (msg->request_headers,
diff --git a/tests/redirect-test.c b/tests/redirect-test.c
index 20e9d48..cd6f1a5 100644
--- a/tests/redirect-test.c
+++ b/tests/redirect-test.c
@@ -44,9 +44,12 @@ static struct {
{ { { "HEAD", "/302", 302 },
{ "HEAD", "/", 200 },
{ NULL } }, 200 },
- /* 303 is a nonsensical response to HEAD, so we don't care
- * what happens there.
+ /* 303 is a nonsensical response to HEAD, but some sites do
+ * it anyway. :-/
*/
+ { { { "HEAD", "/303", 303 },
+ { "HEAD", "/", 200 },
+ { NULL } }, 200 },
{ { { "HEAD", "/307", 307 },
{ "HEAD", "/", 200 },
{ NULL } }, 200 },
--
1.6.5.2
Index: libsoup.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libsoup/F-12/libsoup.spec,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -p -r1.103 -r1.104
--- libsoup.spec 20 Oct 2009 01:30:19 -0000 1.103
+++ libsoup.spec 5 Nov 2009 16:42:11 -0000 1.104
@@ -4,7 +4,7 @@
Name: libsoup
Version: 2.28.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2
Group: Development/Libraries
Summary: Soup, an HTTP library implementation
@@ -12,6 +12,9 @@ URL: http://live.gnome.org/LibSoup
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Source: http://download.gnome.org/sources/libsoup/2.28/libsoup-%{version}.tar.bz2
+# https://bugzilla.gnome.org/show_bug.cgi?id=600830
+Patch0: 0001-Don-t-change-HEAD-to-GET-on-303-redirect.patch
+
### Build Dependencies ###
BuildRequires: glib2-devel >= %{glib2_version}
@@ -48,6 +51,7 @@ you to develop applications that use the
%prep
%setup -q
+%patch0 -p1 -b .youtube
%build
%configure
@@ -85,6 +89,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gtk-doc/html/%{name}-2.4
%changelog
+* Thu Nov 05 2009 Bastien Nocera <bnocera at redhat.com> 2.28.1-2
+- Fix hangs when playing hi-def YouTube videos
+
* Mon Oct 19 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.1-1
- Update to 2.28.1
More information about the scm-commits
mailing list