+ 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
85 lines
2.1 KiB
HTML
85 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<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" 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>
|
|
|