Changeset 27106 in project


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

Also allow disabling of limits

Location:
release/4/intarweb/trunk
Files:
2 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
  • release/4/intarweb/trunk/tests/run.scm

    r27102 r27106  
    11(require-extension test extras uri-common intarweb srfi-18)
     2
     3;; Below, there are specific tests for when these do have a value
     4(http-header-limit #f)
     5(http-line-limit #f)
    26
    37(define-syntax test-error*
Note: See TracChangeset for help on using the changeset viewer.