bug#13534:

2013-01-24 Thread Daniel Llorens
Ok, it seems that this was fixed before I reported it. Close?





bug#13534:

2013-01-24 Thread Mark H Weaver
Daniel Llorens  writes:
> Ok, it seems that this was fixed before I reported it. Close?

I see that ",arg0" was changed to ",(car args)" but you also wrote:

> ,arg0 should be ,(car args)
> 
> However, even after fixing this, there are problems with the load path

Can you verify that the "problems with the load path" you referred to
are now fixed?

Thanks,
  Mark





bug#13534:

2013-01-24 Thread Daniel Llorens

On Jan 24, 2013, at 12:42, Mark H Weaver wrote:

> Can you verify that the "problems with the load path" you referred to
> are now fixed?
> 
>Thanks,
>  Mark

Yes, that should be the change load -> load-in-vicinity. This was an issue also 
with -s, etc. It works for me now.

Regards,

Daniel




bug#13534: add --language argument breaks -l

2013-01-24 Thread Andy Wingo
On Wed 23 Jan 2013 17:42, Daniel Llorens  writes:

> There is an obvious bug in faabd16… in the handling of "-l"

Sorry about that one!  Embarrassing :P

A
-- 
http://wingolog.org/





bug#13544: (web http) fails to parse numeric timezones in Date header

2013-01-24 Thread Ludovic Courtès
--8<---cut here---start->8---
scheme@(guile-user)> (use-modules(web client)(web uri))
scheme@(guile-user)> (http-get (string->uri "http://www.sqlite.org/";))
web/http.scm:768:6: In procedure parse-asctime-date:
web/http.scm:768:6: Bad Date header: Thu, 24  Jan 2013 21:53:01 +
--8<---cut here---end--->8---

RFC 1123 reads:

   There is a strong trend towards the use of numeric timezone
   indicators, and implementations SHOULD use numeric timezones
   instead of timezone names.  However, all implementations MUST
   accept either notation.  If timezone names are used, they MUST
   be exactly as defined in RFC-822.

Here’s a tentative patch to fix it:

diff --git a/module/web/http.scm b/module/web/http.scm
index 216fddd..2ab5bd0 100644
--- a/module/web/http.scm
+++ b/module/web/http.scm
@@ -1,6 +1,6 @@
 ;;; HTTP messages
 
-;; Copyright (C)  2010, 2011, 2012 Free Software Foundation, Inc.
+;; Copyright (C)  2010, 2011, 2012, 2013 Free Software Foundation, Inc.
 
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
@@ -732,6 +732,20 @@ as an ordered alist."
(minute (parse-non-negative-integer str 19 21))
(second (parse-non-negative-integer str 22 24)))
(make-date 0 second minute hour date month year 0)))
+((string-match? str "aaa, dd aaa  dd:dd:dd .")
+ (let ((date (parse-non-negative-integer str 5 7))
+   (month (parse-month str 8 11))
+   (year (parse-non-negative-integer str 12 16))
+   (hour (parse-non-negative-integer str 17 19))
+   (minute (parse-non-negative-integer str 20 22))
+   (second (parse-non-negative-integer str 23 25))
+   (tz (parse-non-negative-integer str 28 31))
+   (tz-sign (case (string-ref str 27)
+  ((#\+) +1)
+  ((#\-) -1)
+  (else (bad-header 'date str) #f
+   (make-date 0 second minute hour date month year
+  (* tz-sign tz
 (else
  (bad-header 'date str) ; prevent tail call
  #f)))
@@ -778,7 +792,8 @@ as an ordered alist."
 (make-date 0 second minute hour date month year 0)))
 
 (define (parse-date str)
-  (if (string-suffix? " GMT" str)
+  (if (or (string-suffix? " GMT" str)
+  (string-match "[+-][0-9]{4}$" str))
   (let ((comma (string-index str #\,)))
 (cond ((not comma) (bad-header 'date str))
   ((= comma 3) (parse-rfc-822-date str))

Problem is, this particular example has another problem: it has an extra
space before the month name.

How is this best addressed?  Should the parser be more tolerant,
possibly using plain regexps?

Thanks,
Ludo’.