Final
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
code = 200
|
||||
ct = "text/html"
|
||||
content = "<!DOCTYPE html><html><body><h1>Bonjour!</h1></body></html>"
|
||||
print(f"HTTP/1.1 {code}")
|
||||
print(f"Content-Type: {ct}")
|
||||
print(f"Content-Length: {len(content)}")
|
||||
print()
|
||||
print(content)
|
||||
16
cgi/sleep.py
Normal file
16
cgi/sleep.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import time
|
||||
time.sleep(5)
|
||||
|
||||
code = 200
|
||||
ct = "text/html"
|
||||
content = "<!DOCTYPE html><html><body><h1>Je dormais!</h1></body></html>"
|
||||
|
||||
response = f"""
|
||||
HTTP/1.1 {code}
|
||||
Content-Type: {ct}
|
||||
Content-Length: {len(content)}
|
||||
|
||||
{content}
|
||||
"""
|
||||
|
||||
print(response)
|
||||
Reference in New Issue
Block a user