Skip to content

Instantly share code, notes, and snippets.

View TijlE-1951707's full-sized avatar

TijlE-1951707

View GitHub Profile
@fabiand
fabiand / SimpleHTTPPutServer.py
Last active May 31, 2024 10:18
A simple HTTP Server supporting put (python3)
# python3 -m SimpleHTTPPutServer 8080
from http.server import HTTPServer, SimpleHTTPRequestHandler
class PutHTTPRequestHandler(SimpleHTTPRequestHandler):
def do_PUT(self):
print(self.headers)
length = int(self.headers["Content-Length"])
path = self.translate_path(self.path)
with open(path, "wb") as dst: