Changeset 26947 in project


Ignore:
Timestamp:
06/22/12 20:02:50 (9 years ago)
Author:
sjamaan
Message:

intarweb: Strip outgoing pathnames too (maybe a bit too strict...?)

Location:
release/4/intarweb/trunk
Files:
2 edited

Legend:

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

    r26946 r26947  
    669669    (list (conc (unparse-token type)
    670670                (unparse-params (get-params (car header-contents))
    671                                 `((size . ,(lambda (x) (cons RAW (number->string x))))
     671                                `((name . ,pathname-strip-directory)
     672                                  (filename . ,pathname-strip-directory)
     673                                  (size . ,(lambda (x) (cons RAW (number->string x))))
    672674                                  (creation-date . ,rfc1123-time->string)
    673675                                  (modification-date . ,rfc1123-time->string)
  • release/4/intarweb/trunk/tests/run.scm

    r26946 r26947  
    749749                                    (stale . #f)))))))))
    750750  (test-group "Content-disposition unparser"
    751     (test "Attributes are always fully quoted"
     751    (test "Attributes are always fully quoted and filenames stripped"
    752752          "Content-Disposition: form-data; name=\"foo\"; filename=\"a b c\"\r\n"
    753753          (test-unparse-headers `((content-disposition
    754754                                   #(form-data ((name . "foo")
    755                                                 (filename . "a b c")))))))
     755                                                (filename . "blabla/a b c")))))))
    756756    (test "Size and dates are recognised correctly"
    757757          "Content-Disposition: inline; size=20; creation-date=\"Sun, 06 Nov 1994 08:49:37 GMT\"\r\n"
Note: See TracChangeset for help on using the changeset viewer.