xbps: add patch from git to fix libfetch issues with some buggy HTTP servers.
This commit is contained in:
parent
a41aca1344
commit
36d1dc9999
2 changed files with 34 additions and 1 deletions
|
@ -0,0 +1,33 @@
|
|||
From d0a9bbb912630fee4fe7d29b6ec0655142f42fad Mon Sep 17 00:00:00 2001
|
||||
From: Juan RP <xtraeme@gmail.com>
|
||||
Date: Tue, 18 Mar 2014 14:08:40 +0100
|
||||
Subject: [PATCH] Fix #34 (make libfetch always add "Accept: */*" in the HTTP
|
||||
header).
|
||||
|
||||
---
|
||||
NEWS | 6 ++++++
|
||||
lib/fetch/http.c | 8 ++++++++
|
||||
2 files changed, 14 insertions(+)
|
||||
|
||||
--- lib/fetch/http.c
|
||||
+++ lib/fetch/http.c
|
||||
@@ -939,8 +939,16 @@ http_request(struct url *URL, const char *op, struct url_stat *us,
|
||||
http_cmd(conn, "User-Agent: %s\r\n", p);
|
||||
else
|
||||
http_cmd(conn, "User-Agent: %s\r\n", _LIBFETCH_VER);
|
||||
+
|
||||
+ /*
|
||||
+ * Some servers returns 406 (Not Acceptable) if the Accept field is not
|
||||
+ * provided by the user agent, such example is http://alioth.debian.org.
|
||||
+ */
|
||||
+ http_cmd(conn, "Accept: */*\r\n");
|
||||
+
|
||||
if (url->offset > 0)
|
||||
http_cmd(conn, "Range: bytes=%lld-\r\n", (long long)url->offset);
|
||||
+
|
||||
http_cmd(conn, "\r\n");
|
||||
|
||||
/*
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.33
|
||||
revision=3
|
||||
revision=4
|
||||
bootstrap=yes
|
||||
short_desc="The XBPS package system utilities"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
|
Loading…
Reference in a new issue