litle fix in utils trim
+ added 2 functions to check script output + created a html page with 4 forms for tests + created 2 cpp forms, with and without creating header content-length
This commit is contained in:
@@ -3,11 +3,82 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<style>
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin: auto;
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid red;
|
||||
margin: 20px auto;
|
||||
padding: 5px;
|
||||
}
|
||||
form > * {
|
||||
display: flex;
|
||||
margin: 5px auto 5px 5px;
|
||||
}
|
||||
mark {
|
||||
margin: 0px 3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="get">
|
||||
|
||||
<form method="get" action="/cgi-bin/cgi_cpp.out">
|
||||
|
||||
<p><mark>get</mark> form</p>
|
||||
<p>to <mark>/cgi-bin/cgi_cpp.out</mark></p>
|
||||
<label for="fname">First name:</label><br>
|
||||
<input type="text" id="fname" name="fname" value="John"><br>
|
||||
<label for="lname">Last name:</label><br>
|
||||
<input type="text" id="lname" name="lname" value="Doe"><br><br>
|
||||
|
||||
<input type="submit" value="submit">
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<form method="post" action="/cgi-bin/cgi_cpp.out">
|
||||
|
||||
<p><mark>post</mark> form</p>
|
||||
<p>to <mark>/cgi-bin/cgi_cpp.out</mark></p>
|
||||
<label for="fname">First name:</label><br>
|
||||
<input type="text" id="fname" name="fname" value="John"><br>
|
||||
<label for="lname">Last name:</label><br>
|
||||
<input type="text" id="lname" name="lname" value="Doe"><br><br>
|
||||
|
||||
<input type="submit" value="submit">
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<form method="get" action="/cgi-bin/cgi_cpp_content_length.out">
|
||||
|
||||
<p><mark>get</mark> form</p>
|
||||
<p>to <mark>/cgi-bin/cgi_cpp_content_length.out</mark></p>
|
||||
<label for="fname">First name:</label><br>
|
||||
<input type="text" id="fname" name="fname" value="John"><br>
|
||||
<label for="lname">Last name:</label><br>
|
||||
<input type="text" id="lname" name="lname" value="Doe"><br><br>
|
||||
|
||||
<input type="submit" value="submit">
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<form method="post" action="/cgi-bin/cgi_cpp_content_length.out">
|
||||
|
||||
<p><mark>post</mark> form</p>
|
||||
<p>to <mark>/cgi-bin/cgi_cpp_content_length.out</mark></p>
|
||||
<label for="fname">First name:</label><br>
|
||||
<input type="text" id="fname" name="fname" value="John"><br>
|
||||
<label for="lname">Last name:</label><br>
|
||||
<input type="text" id="lname" name="lname" value="Doe"><br><br>
|
||||
|
||||
<input type="submit" value="submit">
|
||||
</form>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post">
|
||||
<input type="submit" value="submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user