mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Don't replace %25 in webadmin test on older erlangs
It seems that is a bug in R21+ httpc, so let's try to keep that test working with older versions
This commit is contained in:
parent
a2e6d8bb6b
commit
ccb47a67c4
@ -91,7 +91,7 @@ changepassword(Config) ->
|
|||||||
++ "/user/" ++ binary_to_list(mue(User)) ++ "/",
|
++ "/user/" ++ binary_to_list(mue(User)) ++ "/",
|
||||||
<<"password=", (mue(Password))/binary,
|
<<"password=", (mue(Password))/binary,
|
||||||
"&chpassword=Change+Password">>),
|
"&chpassword=Change+Password">>),
|
||||||
Password = ejabberd_auth:get_password(User, Server),
|
?match(Password, ejabberd_auth:get_password(User, Server)),
|
||||||
?match({_, _}, binary:match(Body, <<"<p class='result'>Submitted</p>">>)).
|
?match({_, _}, binary:match(Body, <<"<p class='result'>Submitted</p>">>)).
|
||||||
|
|
||||||
removeuser(Config) ->
|
removeuser(Config) ->
|
||||||
@ -126,7 +126,12 @@ page(Config, Tail) ->
|
|||||||
Server = ?config(server_host, Config),
|
Server = ?config(server_host, Config),
|
||||||
Port = ct:get_config(web_port, 5280),
|
Port = ct:get_config(web_port, 5280),
|
||||||
Url = "http://" ++ Server ++ ":" ++ integer_to_list(Port) ++ "/admin/" ++ Tail,
|
Url = "http://" ++ Server ++ ":" ++ integer_to_list(Port) ++ "/admin/" ++ Tail,
|
||||||
string:replace(Url, "%25", "%2525"). % Required by httpc:request for paths in URLs
|
case catch uri_string:normalize("/%2525") of
|
||||||
|
"/%25" ->
|
||||||
|
string:replace(Url, "%25", "%2525", all);
|
||||||
|
_ ->
|
||||||
|
Url
|
||||||
|
end.
|
||||||
|
|
||||||
mue(Binary) ->
|
mue(Binary) ->
|
||||||
misc:url_encode(Binary).
|
misc:url_encode(Binary).
|
||||||
|
Loading…
Reference in New Issue
Block a user