Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Serve unknown file types as UTF-8, as suggested by @janmoesen

  • Loading branch information...
commit ec4b44ef05dfb0f3209c14d47d9875d4d6ff9bb6 1 parent 1a71776
Mathias Bynens authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  .functions
2  .functions
View
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.