mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2025-02-08 14:36:37 +00:00
![Aldo Cortesi](/assets/img/avatar_default.png)
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)
|