Skip to content

Commit

Permalink
Updating mod_http_upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Janusz Jakubiec authored and Janusz Jakubiec committed Jul 4, 2023
1 parent 9b6ac71 commit 8f0bae8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion big_tests/tests/mod_http_upload_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
-export([
test_minio_upload_without_content_type/1,
test_minio_upload_with_content_type/1,

http_upload_item_discovery/1,
http_upload_feature_discovery/1,
advertises_max_file_size/1,
Expand All @@ -33,6 +32,7 @@
rejects_disco_set_iq/1,
rejects_feature_discovery_with_node/1,
get_url_ends_with_filename/1,
get_url_ends_with_filename_with_unicode_characters/1,
urls_contain_s3_hostname/1,
rejects_empty_filename/1,
rejects_negative_filesize/1,
Expand Down Expand Up @@ -64,6 +64,7 @@ groups() ->
rejects_disco_set_iq,
rejects_feature_discovery_with_node,
get_url_ends_with_filename,
get_url_ends_with_filename_with_unicode_characters,
urls_contain_s3_hostname,
rejects_empty_filename,
rejects_negative_filesize,
Expand Down Expand Up @@ -231,6 +232,17 @@ get_url_ends_with_filename(Config) ->
escalus:assert(fun path_ends_with/3, [<<"get">>, Filename], Result)
end).

get_url_ends_with_filename_with_unicode_characters(Config) ->
escalus:story(
Config, [{bob, 1}],
fun(Bob) ->
ServJID = upload_service(Bob),
Filename = unicode:characters_to_binary("très cool.jpg"),
Request = create_slot_request_stanza(ServJID, Filename, 123, undefined),
Result = escalus:send_and_wait(Bob, Request),
escalus:assert(fun path_ends_with/3, [<<"get">>, <<"tr%C3%A8s%20cool.jpg">>], Result)
end).

urls_contain_s3_hostname(Config) ->
escalus:story(
Config, [{bob, 1}],
Expand Down
2 changes: 1 addition & 1 deletion src/http_upload/mod_http_upload.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-behaviour(gen_mod).
-behaviour(mongoose_module_metrics).

-xep([{xep, 363}, {version, "0.3.0"}]).
-xep([{xep, 363}, {version, "1.1.0"}]).

-include("jlib.hrl").
-include("mongoose.hrl").
Expand Down

0 comments on commit 8f0bae8

Please sign in to comment.