From cd6f5938f36ae2b5984ad8894a72bdd6f0e13ed7 Mon Sep 17 00:00:00 2001 From: estevesm <sigma@Joaos-MacBook-Pro.local> Date: Wed, 8 Jul 2020 13:17:32 +0100 Subject: [PATCH] Uniformized the returns --- cgi-bin/hello.php | 3 +-- cgi-bin/hello.pl | 2 +- cgi-bin/hello.py | 12 ++---------- cgi-bin/hello.sh | 11 ----------- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/cgi-bin/hello.php b/cgi-bin/hello.php index cd3dfde..ad1f3cc 100755 --- a/cgi-bin/hello.php +++ b/cgi-bin/hello.php @@ -1,4 +1,3 @@ #!/usr/bin/php <?php echo "Content-type: text/html\n\n"; ?> -<?php echo "Hello, World!"; ?> - +<?php echo "Hello, World!";?> diff --git a/cgi-bin/hello.pl b/cgi-bin/hello.pl index d482883..7b5a1ae 100755 --- a/cgi-bin/hello.pl +++ b/cgi-bin/hello.pl @@ -1,3 +1,3 @@ #!/usr/bin/perl print "Content-type: text/html\n\n"; -print "Hello, World!"; \ No newline at end of file +print "Hello, World!\n"; \ No newline at end of file diff --git a/cgi-bin/hello.py b/cgi-bin/hello.py index 76c95cf..bdc9212 100755 --- a/cgi-bin/hello.py +++ b/cgi-bin/hello.py @@ -1,11 +1,3 @@ #!/usr/bin/python - -print "Content-type:text/html\r\n\r\n" -print '<html>' -print '<head>' -print '<title>Hello World!</title>' -print '</head>' -print '<body>' -print '<h2>Hello, World!</h2>' -print '</body>' -print '</html>' \ No newline at end of file +print "Content-type: text/html\n" +print "Hello, World!" \ No newline at end of file diff --git a/cgi-bin/hello.sh b/cgi-bin/hello.sh index 283b896..7e10e64 100755 --- a/cgi-bin/hello.sh +++ b/cgi-bin/hello.sh @@ -1,16 +1,5 @@ #!/bin/bash - echo "Content-type: text/html" echo "" - -echo '<html>' -echo '<head>' -echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' -echo '<title>Hello World</title>' -echo '</head>' -echo '<body>' echo 'Hello, World!' -echo '</body>' -echo '</html>' - exit 0 -- GitLab