Changeset 33946 in project


Ignore:
Timestamp:
04/08/17 14:05:18 (6 months ago)
Author:
sjamaan
Message:

Fix subparser error raising

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/intarweb/trunk/header-parsers.scm

    r32965 r33946  
    277277(define (rfc1123-subparser str)
    278278  (or (rfc1123-string->time str)
    279       (signal-http-condition "Error parsing RFC 1123 date/time" (list str)
    280                              'rfc1123-subparser 'value str)))
     279      (signal-http-condition
     280       'rfc1123-subparser
     281       "Error parsing RFC 1123 date/time" (list str)
     282       'rfc1123-subparser 'value str)))
    281283
    282284(define (rfc850-subparser str)
    283285  (or (rfc850-string->time str)
    284       (signal-http-condition "Error parsing RFC850 date/time" (list str)
    285                              'rfc850-subparser 'value str)))
     286      (signal-http-condition
     287       'rfc850-subparser
     288       "Error parsing RFC850 date/time" (list str)
     289       'rfc850-subparser 'value str)))
    286290
    287291(define (asctime-subparser str)
    288292  (or (asctime-string->time str)
    289       (signal-http-condition "Error parsing asctime() date/time" (list str)
    290                              'asctime-subparser 'value str)))
     293      (signal-http-condition
     294       'asctime-subparser
     295       "Error parsing asctime() date/time" (list str)
     296       'asctime-subparser 'value str)))
    291297
    292298;; rfc1123-date | rfc850-date | asctime-date
    293299(define (http-date-subparser str)
    294300  (or (http-date-string->time str)
    295       (signal-http-condition "Error parsing date/time" (list str)
    296                              'http-date-subparser 'value str)))
     301      (signal-http-condition
     302       'http-date-subparser
     303       "Error parsing date/time" (list str)
     304       'http-date-subparser 'value str)))
    297305
    298306;; Change the accuracy of a number to 'digits' number of digits to the
     
    669677                        (cond ((char=? c #\newline)
    670678                               (signal-http-condition
     679                                'quote-string
    671680                                (conc "Unencoded newline in header contents! "
    672681                                      "Please encode the newline in a way "
     
    886895        (pass (alist-ref 'password params)))
    887896    (if (string-index user #\:)
    888         (signal-http-condition "Colon detected in username. This is not supported by basic auth!"
    889                                (list user) 'username-with-colon 'value user)
     897        (signal-http-condition
     898         'basic-auth-param-subunparser
     899         "Colon detected in username. This is not supported by basic auth!"
     900         (list user) 'username-with-colon 'value user)
    890901        (base64-encode (string-append user ":" pass)))))
    891902
Note: See TracChangeset for help on using the changeset viewer.