]> gitweb.factorcode.org Git - factor.git/commitdiff
don't unquote keys in mime.multipart
authorU-C4\Administrator <Administrator@k.(none)>
Tue, 20 Jan 2009 19:23:58 +0000 (13:23 -0600)
committerU-C4\Administrator <Administrator@k.(none)>
Tue, 20 Jan 2009 19:23:58 +0000 (13:23 -0600)
basis/mime/multipart/multipart-tests.factor
basis/mime/multipart/multipart.factor

index 4e260a2102854f06b2f2b505f30b1fe0de5d4cd7..5d5f1b813a353c57737b7c92a9e4e342bae7ec78 100644 (file)
@@ -20,10 +20,10 @@ IN: mime.multipart.tests
 
 [ t ] [
     mime-test-stream [ upload-separator parse-multipart ] with-input-stream
-    drop "up.txt" swap key?
+    drop "\"up.txt\"" swap key?
 ] unit-test
 
 [ t ] [
     mime-test-stream [ upload-separator parse-multipart ] with-input-stream
-    nip "text1" swap key?
+    nip "\"text1\"" swap key?
 ] unit-test
index 82e24bc13202704225d27d08762f02d360315b5f..e7985f803d025a6540dbbd5388289c5859421196 100755 (executable)
@@ -76,20 +76,7 @@ ERROR: end-of-stream multipart ;
         parse-headers >hashtable >>header
     ] if ;
 
-: quote? ( ch -- ? ) "'\"" member? ;
-
-: quoted? ( str -- ? )
-    {
-        [ length 1 > ]
-        [ first quote? ]
-        [ [ first ] [ peek ] bi = ]
-    } 1&& ;
-
-: unquote ( string -- string' )
-    dup quoted? [ but-last-slice rest-slice >string ] when ;
-
 : save-uploaded-file ( multipart -- )
-    [ unquote ] change-filename
     dup filename>> empty? [
         drop
     ] [
@@ -99,7 +86,6 @@ ERROR: end-of-stream multipart ;
     ] if ;
 
 : save-form-variable ( multipart -- )
-    [ unquote ] change-name
     [ [ header>> ] [ name>> ] [ name-content>> ] tri mime-variable boa ]
     [ name>> ]
     [ form-variables>> set-at ] tri ;