aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2012-01-02 15:25:03 +0100
committerMathias Bynens <mathias@qiwi.be>2012-01-02 15:25:03 +0100
commitec4b44ef05dfb0f3209c14d47d9875d4d6ff9bb6 (patch)
tree6449ba94557e42af3a75280d70ab0d0b3afb01a2 /.functions
parent1a71776fefe91349892db4961016807acab7f50d (diff)
downloaddotfiles-ec4b44ef05dfb0f3209c14d47d9875d4d6ff9bb6.tar.gz
dotfiles-ec4b44ef05dfb0f3209c14d47d9875d4d6ff9bb6.tar.bz2
dotfiles-ec4b44ef05dfb0f3209c14d47d9875d4d6ff9bb6.zip
Serve unknown file types as UTF-8, as suggested by @janmoesen
Diffstat (limited to '.functions')
-rw-r--r--.functions2
1 files changed, 1 insertions, 1 deletions
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.