unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Guildhall: fix download path and keep connection alive
@ 2011-08-15 19:20 Nala Ginrut
  2011-09-04 11:33 ` Ian Price
  0 siblings, 1 reply; 3+ messages in thread
From: Nala Ginrut @ 2011-08-15 19:20 UTC (permalink / raw)
  To: guile-devel


[-- Attachment #1.1: Type: text/plain, Size: 536 bytes --]

hi guys!
I realized there're two problems in our shinning Guildhall.

1. When "http-download" calls "relative-uri", the first arg should be a
string, say "srfi", but ("srfi").
2. I can install single package perfectly, but if there're several
dependencies, guildhall will throw a timeout.
    eg. guild hall install spells, the first dependency will be installed
perfectly, but the second will give me a long time no response then timeout.

So I changed the connection to keep-alive mode. And everything's OK now.

A patch is attached.

[-- Attachment #1.2: Type: text/html, Size: 714 bytes --]

[-- Attachment #2: 0001-fix-download-path-and-keep-connection-alive.patch --]
[-- Type: application/octet-stream, Size: 1067 bytes --]

From 8a137175b4ed77b30be676ef97c0719b56eb329d Mon Sep 17 00:00:00 2001
From: NalaGinrut <NalaGinrut@gmail.com>
Date: Tue, 16 Aug 2011 02:54:41 +0800
Subject: [PATCH] fix download path and keep connection alive

---
 guild/repository.scm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/guild/repository.scm b/guild/repository.scm
index 842230f..6d5a8f4 100644
--- a/guild/repository.scm
+++ b/guild/repository.scm
@@ -132,12 +132,12 @@
           (if (file-exists? destination)
               destination
               (http-download destination
-                             (relative-uri location base-uri)))))))))
+                             (relative-uri (car location) base-uri)))))))))
 
 (define (http-download destination uri)
   (message "Fetching " (uri->string uri))
   (call-with-values (lambda ()
-                      (http-get uri #:decode-body? #f))
+                      (http-get uri #:decode-body? #f #:keep-alive? #t))
     (lambda (response body)
       (case (response-code response)
         ((200)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-03 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 19:20 [PATCH] Guildhall: fix download path and keep connection alive Nala Ginrut
2011-09-04 11:33 ` Ian Price
2012-01-03 16:26   ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).