Changeset 27106 in project for release/4/intarweb/trunk/intarweb.scm


Ignore:
Timestamp:
07/21/12 19:53:39 (9 years ago)
Author:
sjamaan
Message:

Also allow disabling of limits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/intarweb/trunk/intarweb.scm

    r27102 r27106  
    106106
    107107(define (safe-read-line p)
    108   (let* ((line (read-line p (http-line-limit))))
    109     (if (and (not (eof-object? line)) (= (http-line-limit) (string-length line)))
     108  (let* ((limit (http-line-limit))
     109         (line (read-line p (http-line-limit))))
     110    (if (and (not (eof-object? line)) limit (= limit (string-length line)))
    110111        (signal-http-condition "Max allowed line length exceeded" (list p)
    111                                'line-limit-exceeded
    112                                'contents line 'limit (http-line-limit))
     112                               'line-limit-exceeded 'contents line 'limit limit)
    113113        line)))
    114114
Note: See TracChangeset for help on using the changeset viewer.