Module: tools
Branch: master
Commit: 00fe5045513e213d54c87f1a1e43d8f38a6d6a48
URL: https://source.winehq.org/git/tools.git/?a=commit;h=00fe5045513e213d54c87f1…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Apr 1 17:09:41 2022 +0200
testbot: Document SecureConnection() and MakeSecureURL().
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Utils.pm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/testbot/lib/WineTestBot/Utils.pm b/testbot/lib/WineTestBot/Utils.pm
index 5315c75..d93a938 100644
--- a/testbot/lib/WineTestBot/Utils.pm
+++ b/testbot/lib/WineTestBot/Utils.pm
@@ -42,11 +42,38 @@ use WineTestBot::Config;
# Web helpers
#
+=pod
+=over 12
+
+=item C<SecureConnection()>
+
+Returns true if the user accessed the website over a secure connection.
+
+This relies on the web server setting the $HTTPS environment variable.
+
+=back
+=cut
+
sub SecureConnection()
{
return defined($ENV{"HTTPS"}) && $ENV{"HTTPS"} eq "on";
}
+=pod
+=over 12
+
+=item C<MakeSecureURL()>
+
+Builds a URL that accesses this website using https if possible.
+The parameter should be an absolute path that includes neither the protocol
+nor the hostname.
+
+Note that this method uses $HTTP_HOST which may not match the official website
+hostname. As such this should only be used for providing URLs back to the user
+accessing the website, not for URLs sent to third-parties.
+
+=back
+=cut
sub MakeSecureURL($)
{
my ($URL) = @_;
Module: tools
Branch: master
Commit: d33367a150aa6cc66032b97b0e4e617e5c0d0dfd
URL: https://source.winehq.org/git/tools.git/?a=commit;h=d33367a150aa6cc66032b97…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Apr 1 17:09:07 2022 +0200
testbot/TestAgent: Fix the spelling of a comment in the module.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/TestAgent.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index 6457b4d..2d60021 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -1526,7 +1526,7 @@ sub Upgrade($$)
my $rc = $self->_RecvList('');
# The server has quit and thus the connection is no longer usable.
- # So disconnect now to force the next RPC to reconnect, instead or letting it
+ # So disconnect now to force the next RPC to reconnect instead of letting it
# try to reuse the broken connection and fail.
$self->Disconnect();