mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
d5e3722c97
Many editors make it hard save a file without a terminating newline on the last line. When editing message bodies, this can cause problems. For now, I just strip the newlines off the end of the body when we return from an editor.
9 lines
227 B
Python
9 lines
227 B
Python
import socket
|
|
from SocketServer import BaseServer
|
|
from BaseHTTPServer import HTTPServer
|
|
import handler
|
|
|
|
def make(port):
|
|
server_address = ('127.0.0.1', port)
|
|
return HTTPServer(server_address, handler.TestRequestHandler)
|