Skip to content

Commit a577737

Browse files
committed
Add extra multipart test to check bug workaround
Apache Commons FileUpload2 2.0.0-M1 has an off-by-one bug when setting the max file size. This test checks the workaround added.
1 parent 0f0eef7 commit a577737

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ring-core/test/ring/middleware/test/multipart_params.clj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@
203203
(let [response ((wrap-multipart-params handler {:max-file-size 6})
204204
{:headers headers, :body (string-input-stream form-body)})]
205205
(is (= 413 (:status response))))
206+
(let [response ((wrap-multipart-params handler {:max-file-size 8})
207+
{:headers headers, :body (string-input-stream form-body)})]
208+
(is (= 413 (:status response))))
206209
(let [response ((wrap-multipart-params handler {:max-file-size 9})
207210
{:headers headers, :body (string-input-stream form-body)})]
208211
(is (= 200 (:status response))))

0 commit comments

Comments
 (0)