1use strict; 2use warnings; 3 4use File::Basename qw(dirname); 5 6use lib dirname(__FILE__) . "/lib"; 7 8use Test::Nginx::Socket tests => 2; 9use Test::More; 10use Test::Nginx::UploadModule; 11 12no_long_string(); 13no_shuffle(); 14run_tests(); 15 16__DATA__ 17=== TEST 1: OPTIONS request 18--- config 19location /upload/ { 20 upload_pass @upstream; 21 upload_resumable on; 22 upload_set_form_field "upload_tmp_path" "$upload_tmp_path"; 23 upload_cleanup 400 404 499 500-505; 24} 25--- request 26OPTIONS /upload/ 27--- error_code: 200 28 29=== TEST 2: http2 OPTIONS request 30--- http2 31--- config 32location /upload/ { 33 upload_pass @upstream; 34 upload_resumable on; 35 upload_set_form_field "upload_tmp_path" "$upload_tmp_path"; 36 upload_cleanup 400 404 499 500-505; 37} 38--- request 39OPTIONS /upload/ 40--- error_code: 200 41