-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(cgi): starting files to check non blocking behaviour
- Loading branch information
Showing
4 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
server { | ||
listen 8080; | ||
server_name www.development_site; | ||
allow_methods GET POST DELETE; | ||
autoindex off; | ||
root /var/; | ||
error_page 404 404.html; | ||
cgi_ext .cgi; | ||
|
||
location /admin { | ||
return http://google.com; | ||
index admin.html; | ||
allow_methods GET POST; | ||
} | ||
location /cgi-bin/ { | ||
cgi_ext .cgi .py; | ||
autoindex off; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import time | ||
from datetime import datetime | ||
|
||
# Define the duration of the counter in seconds | ||
duration = 10 | ||
|
||
# Print the HTTP header | ||
print("Content-Type: text/html") | ||
print() | ||
|
||
# Print the start time | ||
start_time = datetime.now() | ||
print(f"<html><body>") | ||
print(f"<h1>Counter Script</h1>") | ||
print(f"<p>Start time: {start_time}</p>") | ||
|
||
# Counter loop | ||
for i in range(duration): | ||
time.sleep(1) # Wait for 1 second | ||
|
||
# Print the end time | ||
end_time = datetime.now() | ||
print(f"<p>End time: {end_time}</p>") | ||
print("</body></html>") |
Empty file.