guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-109-gab66f


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-109-gab66fb3
Date: Sat, 07 Jan 2012 00:37:16 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=ab66fb3cd1d6e4343741ccb406e17eb3314eba84

The branch, stable-2.0 has been updated
       via  ab66fb3cd1d6e4343741ccb406e17eb3314eba84 (commit)
       via  eaaf94c4ec6d6768eaa11029c9fd3029e1bd5a0c (commit)
      from  992a387958946a8726583567ff630760e50bf7b3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ab66fb3cd1d6e4343741ccb406e17eb3314eba84
Author: Ian Price <address@hidden>
Date:   Thu Sep 29 03:12:00 2011 +0100

    `write-request-line' writes absolute paths, not absolute URIs.
    
    * module/web/http.scm (write-request-line): RFC 2616 says that absolute
      paths are used to identify resources on an origin server.

commit eaaf94c4ec6d6768eaa11029c9fd3029e1bd5a0c
Author: Andy Wingo <address@hidden>
Date:   Sat Jan 7 01:26:00 2012 +0100

    remove duplicate write-uri definition
    
    * module/web/http.scm: Remove duplicate write-uri definition.

-----------------------------------------------------------------------

Summary of changes:
 module/web/http.scm |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/module/web/http.scm b/module/web/http.scm
index afe70a7..aa099fe 100644
--- a/module/web/http.scm
+++ b/module/web/http.scm
@@ -805,9 +805,6 @@ ordered alist."
     (display-digits (date-second date) 2 port)
     (display " GMT" port)))
 
-(define (write-uri uri port)
-  (display (uri->string uri) port))
-
 (define (parse-entity-tag val)
   (if (string-prefix? "W/" val)
       (cons (parse-qstring val 2) #f)
@@ -1082,7 +1079,18 @@ three values: the method, the URI, and the version."
   "Write the first line of an HTTP request to @var{port}."
   (display method port)
   (display #\space port)
-  (write-uri uri port)
+  (let ((path (uri-path uri))
+        (query (uri-query uri)))
+    (if (not (string-null? path))
+        (display path port))
+    (if query
+        (begin
+          (display "?" port)
+          (display query port)))
+    (if (and (string-null? path)
+             (not query))
+        ;; Make sure we display something.
+        (display "/" port)))
   (display #\space port)
   (write-http-version version port)
   (display "\r\n" port))


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]