From ec4b44ef05dfb0f3209c14d47d9875d4d6ff9bb6 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Mon, 2 Jan 2012 15:25:03 +0100 Subject: Serve unknown file types as UTF-8, as suggested by @janmoesen --- .functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.functions b/.functions index 0caab74..833f5e6 100644 --- a/.functions +++ b/.functions @@ -8,7 +8,7 @@ function server() { local port="${1:-8000}" open "http://localhost:${port}/" # Set the default Content-Type to `text/plain` instead of `application/octet-stream` - python -c "import SimpleHTTPServer; import sys; sys.argv = [None, '$port']; SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map[''] = 'text/plain'; SimpleHTTPServer.test();" + python -c "import SimpleHTTPServer; import sys; sys.argv = [None, '$port']; SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map[''] = 'text/plain;charset=UTF-8'; SimpleHTTPServer.test();" } # Test if HTTP compression (RFC 2616 + SDCH) is enabled for a given URL. -- cgit v1.2.3