 ERROR: no-content-disposition multipart ;
 
 : process-header ( multipart -- multipart )
-    "content-disposition" over header>> at ";" split1 swap {
+    dup "content-disposition" header ";" split1 swap {
         { "form-data" [
             parse-content-disposition-form-data >>content-disposition
             parse-form-data

    dup filename>> empty-name? [
        drop
    ] [
        [ [ header>> ] [ filename>> ] [ temp-file>> ] tri mime-file boa ]
        [ content-disposition>> "name" of unquote ]
        [ mime-parts>> set-at ] tri
    ] if ;

! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors ascii assocs byte-arrays combinators fry
hashtables http http.parsers io io.encodings.binary io.files
io.files.unique io.streams.string kernel math quoting sequences
splitting ;
IN: mime.multipart

CONSTANT: buffer-size 65536
