1// META: title=FormData: FormData: Upload files named using punctuation 2// META: script=../support/send-file-formdata-helper.js 3 "use strict"; 4 5 // These have characters that undergo processing in name=, 6 // filename=, and/or value; formDataPostFileUploadTest postprocesses 7 // expectedEncodedBaseName for these internally. 8 9 formDataPostFileUploadTest({ 10 fileNameSource: "ASCII", 11 fileBaseName: "file-for-upload-in-form-QUOTATION-MARK-[\x22].txt", 12 }); 13 14 formDataPostFileUploadTest({ 15 fileNameSource: "ASCII", 16 fileBaseName: '"file-for-upload-in-form-double-quoted.txt"', 17 }); 18 19 formDataPostFileUploadTest({ 20 fileNameSource: "ASCII", 21 fileBaseName: "file-for-upload-in-form-REVERSE-SOLIDUS-[\\].txt", 22 }); 23 24 // The rest should be passed through unmodified: 25 26 formDataPostFileUploadTest({ 27 fileNameSource: "ASCII", 28 fileBaseName: "file-for-upload-in-form-EXCLAMATION-MARK-[!].txt", 29 }); 30 31 formDataPostFileUploadTest({ 32 fileNameSource: "ASCII", 33 fileBaseName: "file-for-upload-in-form-DOLLAR-SIGN-[$].txt", 34 }); 35 36 formDataPostFileUploadTest({ 37 fileNameSource: "ASCII", 38 fileBaseName: "file-for-upload-in-form-PERCENT-SIGN-[%].txt", 39 }); 40 41 formDataPostFileUploadTest({ 42 fileNameSource: "ASCII", 43 fileBaseName: "file-for-upload-in-form-AMPERSAND-[&].txt", 44 }); 45 46 formDataPostFileUploadTest({ 47 fileNameSource: "ASCII", 48 fileBaseName: "file-for-upload-in-form-APOSTROPHE-['].txt", 49 }); 50 51 formDataPostFileUploadTest({ 52 fileNameSource: "ASCII", 53 fileBaseName: "file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt", 54 }); 55 56 formDataPostFileUploadTest({ 57 fileNameSource: "ASCII", 58 fileBaseName: "file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt", 59 }); 60 61 formDataPostFileUploadTest({ 62 fileNameSource: "ASCII", 63 fileBaseName: "file-for-upload-in-form-ASTERISK-[*].txt", 64 }); 65 66 formDataPostFileUploadTest({ 67 fileNameSource: "ASCII", 68 fileBaseName: "file-for-upload-in-form-PLUS-SIGN-[+].txt", 69 }); 70 71 formDataPostFileUploadTest({ 72 fileNameSource: "ASCII", 73 fileBaseName: "file-for-upload-in-form-COMMA-[,].txt", 74 }); 75 76 formDataPostFileUploadTest({ 77 fileNameSource: "ASCII", 78 fileBaseName: "file-for-upload-in-form-FULL-STOP-[.].txt", 79 }); 80 81 formDataPostFileUploadTest({ 82 fileNameSource: "ASCII", 83 fileBaseName: "file-for-upload-in-form-SOLIDUS-[/].txt", 84 }); 85 86 formDataPostFileUploadTest({ 87 fileNameSource: "ASCII", 88 fileBaseName: "file-for-upload-in-form-COLON-[:].txt", 89 }); 90 91 formDataPostFileUploadTest({ 92 fileNameSource: "ASCII", 93 fileBaseName: "file-for-upload-in-form-SEMICOLON-[;].txt", 94 }); 95 96 formDataPostFileUploadTest({ 97 fileNameSource: "ASCII", 98 fileBaseName: "file-for-upload-in-form-EQUALS-SIGN-[=].txt", 99 }); 100 101 formDataPostFileUploadTest({ 102 fileNameSource: "ASCII", 103 fileBaseName: "file-for-upload-in-form-QUESTION-MARK-[?].txt", 104 }); 105 106 formDataPostFileUploadTest({ 107 fileNameSource: "ASCII", 108 fileBaseName: "file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt", 109 }); 110 111 formDataPostFileUploadTest({ 112 fileNameSource: "ASCII", 113 fileBaseName: "file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt", 114 }); 115 116 formDataPostFileUploadTest({ 117 fileNameSource: "ASCII", 118 fileBaseName: "file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt", 119 }); 120 121 formDataPostFileUploadTest({ 122 fileNameSource: "ASCII", 123 fileBaseName: "file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt", 124 }); 125 126 formDataPostFileUploadTest({ 127 fileNameSource: "ASCII", 128 fileBaseName: "file-for-upload-in-form-VERTICAL-LINE-[|].txt", 129 }); 130 131 formDataPostFileUploadTest({ 132 fileNameSource: "ASCII", 133 fileBaseName: "file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt", 134 }); 135 136 formDataPostFileUploadTest({ 137 fileNameSource: "ASCII", 138 fileBaseName: "file-for-upload-in-form-TILDE-[~].txt", 139 }); 140 141 formDataPostFileUploadTest({ 142 fileNameSource: "ASCII", 143 fileBaseName: "'file-for-upload-in-form-single-quoted.txt'", 144 }); 145