Skip to content

Instantly share code, notes, and snippets.

@jongiddy
jongiddy / server.py
Last active March 6, 2019 03:25 — forked from mildred/server.py
Python 3 http.server with PUT support
#!/usr/bin/env python
import argparse
import http.server
import os
class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def do_PUT(self):
path = self.translate_path(self.path)
if path.endswith('/'):