[devscripts] 01/02: namecheck: Fix “406 Not Acceptable” error when querying Alioth.

James McCoy jamessan at debian.org
Tue Oct 8 02:46:58 UTC 2013


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit fcbac725beac134d300432ecd6415cbbf97a5aed
Author: James McCoy <jamessan at debian.org>
Date:   Mon Oct 7 22:22:43 2013 -0400

    namecheck: Fix “406 Not Acceptable” error when querying Alioth.
    
    Closes: #725228
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog     |    7 +++++++
 scripts/namecheck.pl |    7 +++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2250f97..88d8c02 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+devscripts (2.13.5) UNRELEASED; urgency=low
+
+  * namecheck: Fix “406 Not Acceptable” error when querying Alioth.  (Closes:
+    #725228)
+
+ -- James McCoy <jamessan at debian.org>  Mon, 07 Oct 2013 22:21:31 -0400
+
 devscripts (2.13.4) unstable; urgency=low
 
   [ James McCoy ]
diff --git a/scripts/namecheck.pl b/scripts/namecheck.pl
index 0cc2d04..8fedb2d 100755
--- a/scripts/namecheck.pl
+++ b/scripts/namecheck.pl
@@ -142,6 +142,8 @@ sub testSites
     $ua->timeout(10);
     $ua->env_proxy();
 
+    my $headers = HTTP::Headers->new();
+    $headers->header('Accept' => '*/*');
 
     foreach my $entry (@patterns)
     {
@@ -186,7 +188,8 @@ sub testSites
         #
         #  Get the URL
         #
-        my $response = $ua->get($url);
+        my $request = HTTP::Request->new('GET', $url, $headers);
+        my $response = $ua->request($request);
 
         #
         #  If success we look at the returned text.
@@ -256,7 +259,7 @@ __DATA__
 # file ~/.namecheckrc with your own contents in the same format.
 #
 http://%s.tuxfamily.org/             | Not Found
-http://alioth.debian.org/projects/%s | project does not exist
+http://alioth.debian.org/projects/%s | Software Map
 http://developer.berlios.de/projects/%s | Invalid Project
 http://freshmeat.net/projects/%s     | We encounted an error
 http://launchpad.net/%s              | no page with this address

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list