Skip to content

Commit

Permalink
Add utf-8 charset to Content-Type and HTML pages
Browse files Browse the repository at this point in the history
Fix #13

Signed-off-by: Byron Ruth <b@devel.io>
  • Loading branch information
bruth committed Sep 15, 2015
1 parent a57aab5 commit a820898
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions assets/wrap.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<!doctype html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Data Models Service</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>{{.Style}}</style>
</head>
<body>
Expand Down
8 changes: 4 additions & 4 deletions bindata.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func assets_full_md() (*asset, error) {
return nil, err
}

info := bindata_file_info{name: "assets/full.md", size: 1430, mode: os.FileMode(420), modTime: time.Unix(1439170280, 0)}
info := bindata_file_info{name: "assets/full.md", size: 1430, mode: os.FileMode(420), modTime: time.Unix(1439203181, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand Down Expand Up @@ -119,7 +119,7 @@ func assets_models_md() (*asset, error) {
return nil, err
}

info := bindata_file_info{name: "assets/models.md", size: 115, mode: os.FileMode(420), modTime: time.Unix(1438718413, 0)}
info := bindata_file_info{name: "assets/models.md", size: 115, mode: os.FileMode(420), modTime: time.Unix(1439203181, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand Down Expand Up @@ -164,7 +164,7 @@ func assets_style_css() (*asset, error) {
return a, nil
}

var _assets_wrap_html = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x56\x4d\x6f\xe3\x36\x13\xbe\xfb\x57\x4c\xf0\x02\x4b\xe9\x85\x22\x25\x87\xbd\x34\x92\x8b\x4d\xb3\x28\x0a\xb4\x59\xa0\x9b\x4b\x11\xe4\x40\x4b\x23\x99\xbb\x94\xa8\x92\x54\xbc\x82\xed\xff\xde\x21\x25\x47\x91\xed\xa4\xa8\x10\x84\x16\xe7\xf3\x79\x66\x86\x54\x7a\x51\xa8\xdc\xf6\x2d\xc2\xda\xd6\x72\xb9\x48\xd7\xc8\x8b\xe5\x02\xe8\x49\x8d\xed\x25\x2e\xb7\xdb\xf8\xab\xfb\xb1\xdf\xa7\xc9\xb0\xb3\x48\x93\x41\x2b\x5d\xa9\xa2\x1f\x95\x0b\xf1\x0c\xa2\xc8\x98\x93\xa0\x66\xc3\xae\x97\x70\xc8\x25\x37\x26\x63\x2b\xcd\x9b\x82\xc1\x5a\x63\x99\xb1\x84\x2d\xef\xb8\xe5\xf0\x87\x2a\x50\x9a\x34\xe1\xcb\xc5\x64\xd2\xc9\xc9\xde\x6f\x48\xb1\x24\x3f\xa3\x65\xed\x4d\xd8\x72\x32\x4d\x13\x52\x78\xc7\x42\x63\xab\xc8\xe0\x4f\xb7\x9c\xea\xa7\xc9\x21\x5e\x9a\x10\x8c\x31\x11\xb2\x76\x78\x4c\xae\x95\x94\x97\xbc\xc9\xd7\x4a\x1f\x92\xff\x1f\x5b\x3e\xa8\x76\x48\x7a\x82\x3f\xc2\xac\xb9\xfe\x5e\xa8\x4d\x73\xe9\xd8\x79\x45\x04\x11\xf9\x8b\x6a\x2c\x36\x76\xbf\x3f\x8d\x46\x71\x44\x6b\x27\xed\xa0\xec\x9a\xdc\x0a\xd5\x04\x21\x6c\x17\x33\x6c\x49\x02\x77\xb8\x52\x24\x47\xc0\x1f\x98\x77\x16\x0d\xa8\x46\xf6\x60\xd7\x08\x94\x84\x85\x9c\x4b\x09\xaa\x04\x0e\x07\x37\xc0\x4b\x8b\xda\x69\x1c\xfb\x32\x2d\xe6\xa2\x14\x58\xc0\x86\x0b\x0b\x2d\x6a\xa1\x8a\x78\xa6\xf5\xe2\xa4\x18\xe3\xfa\xec\x22\x6f\x10\x81\xa8\x6b\x2c\x04\xb7\xe8\x32\x85\xa3\xe7\x99\x53\x50\x51\xa3\xea\xec\xcd\xe2\x44\xaa\xd1\x76\xba\x81\x19\xd6\x63\x9d\x83\x97\xdc\x91\xf7\xc3\x42\x46\x20\x84\x89\xce\xea\xb9\x87\xeb\xca\x90\x12\x2d\x5d\x4d\x64\x9b\x33\x61\x0f\x2e\x25\x77\x9c\x64\xff\x1e\xdf\x3d\x23\x0a\x52\x6f\x3a\x29\x6f\xde\xd4\x13\x25\x04\x17\xaf\x38\x71\xce\x63\xde\xb6\xb2\x0f\x46\x08\x91\xcf\x31\x3c\xef\x62\xff\x4e\xbe\xae\xac\xf7\x6a\x43\x29\xbc\xf8\x87\x0f\x1f\xe0\xe2\x6d\x82\xdd\x93\x4b\xe4\xfa\x61\x50\x09\x46\xd5\x37\x82\x4f\x18\x0d\xda\x83\x89\x67\x69\x28\x76\xf8\x46\x08\x87\x79\x4c\xee\x3f\x01\xde\xcf\xb7\x8e\xb1\x3b\xcc\xc3\x00\x7e\xf2\xf3\x47\x79\xd1\x71\xe5\xcb\x1a\x57\x68\x3f\x4b\x74\x3f\x6f\xfb\xdf\x8a\xe0\x68\x50\x8f\x13\xa5\x3e\xff\xea\x15\xc0\x2a\xfa\x6b\xe7\xfd\xfd\x3a\x46\xcc\x8b\xe2\xf3\x33\xb9\xfd\x5d\x18\x1a\x56\xd4\x01\xcb\xa5\xc8\xbf\xb3\x68\x6a\x13\x74\xf2\x73\xbd\xe2\x05\x71\xab\xfd\x7a\x87\x25\xef\xa4\x0d\xce\xe0\x1e\x02\x06\x57\x11\x5c\x1d\x49\xf7\x14\x86\x4b\x83\x67\x00\x3c\xa8\xaa\x92\x38\xda\xc2\x00\x74\x8e\x63\x23\x1a\x3a\x79\xce\x20\x18\x6c\x08\xc2\x6c\x80\xdf\xc7\xe2\x27\x57\xb5\xc4\x79\x30\xfa\x6d\x79\x85\x7f\x7d\x29\x4b\xea\x0d\xd8\xed\xa6\x52\x0c\xde\xe9\x44\x0c\xe1\x12\x82\x97\x6d\xa2\x8d\x16\xda\x76\xca\x57\xe7\x5a\x67\xc6\xbb\xbf\x5c\xe2\x42\x98\x56\xf2\xde\x4d\x39\x19\x2e\xe1\xe3\x15\xfc\x0c\x6c\x25\x15\x55\x00\x7e\x02\xd6\xa8\x06\xd9\x09\x65\xd7\x1f\xc3\x33\xbc\xed\xc3\x03\xf7\x74\x75\x8d\xe7\xab\x7f\xdd\x6e\xa9\x61\xe3\x5f\x95\x22\x3e\x3f\x35\x5c\xf6\x56\xe4\xe6\x70\x2a\xcf\x4f\xe2\x89\x28\x11\x99\x48\x45\x55\xa4\x23\x1e\xd5\xe1\x56\x3c\xb2\x23\x07\x5f\x56\xdf\x30\xb7\xec\x29\xd3\x37\xe2\x51\x3f\x65\xee\xdf\x6e\x37\x9d\x2d\x73\x8a\x03\x27\x8e\xff\xce\x86\x65\xb7\x7b\x7c\x0a\xe3\xb6\x33\xeb\xe0\xe5\xe0\x0a\xf7\x91\x17\xca\xec\xfa\xff\x0d\x6e\x80\xee\x4b\x24\x40\x3c\x33\x71\xae\x91\x5e\xc6\xfe\x0f\x54\x38\x9d\x86\x35\x49\xa7\xd1\x30\xb7\xfd\x03\xaf\xee\x79\x8d\xa4\xf4\x78\xf5\x74\xc3\x63\x6e\xfa\x26\xcf\xae\xe9\x97\xd1\x79\x56\xdd\xd4\x54\x56\x4d\xaa\xf7\x74\x9b\xc6\xa2\x31\xa8\xed\x2d\x96\x4a\x63\xe0\x60\x1e\x95\x8c\x18\x1d\x7a\x21\x3a\x54\x39\x62\x03\x5f\x2c\x62\x49\xb2\xd9\x6c\xe2\xca\x93\x42\x73\x38\xb2\x12\xe7\xaa\x4e\xa6\xb7\x6f\x86\x34\x2b\x3e\x1b\xd0\x8a\xd3\x8c\x79\x44\xd4\xa1\x8c\xee\xc9\x93\xca\xb8\x7d\xde\x59\xc5\x5e\x4d\x8b\xb3\x32\x48\x5f\x14\x24\x73\x9d\xf9\x2c\x70\xc3\x4e\xea\x3d\x94\x9b\xd4\xa8\xbc\x69\x32\x7c\xb0\xd0\xf7\x8b\xff\xd8\xf9\x27\x00\x00\xff\xff\xbf\x3a\x67\x84\xfd\x08\x00\x00")
var _assets_wrap_html = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x56\x5f\x6f\xa3\x38\x10\x7f\xcf\xa7\x70\x7b\xd2\x9a\x9c\x08\xb4\x0f\x2b\x9d\xae\x90\xd3\xf6\xba\x3a\x9d\x74\xd7\x95\xae\x7d\x39\x55\x7d\x70\x60\x20\xde\x35\x98\xb5\x4d\x28\x4a\xf2\xdd\x6f\x6c\xa0\x84\x24\xed\x69\x51\x55\x82\xe7\xef\xef\x37\x33\xb6\xa3\x8b\x54\x26\xa6\xad\x80\xac\x4d\x21\x96\xb3\x68\x0d\x2c\x5d\xce\x08\x3e\x51\x01\x86\x91\x64\xcd\x94\x06\x13\x5f\xd6\x26\x5b\xfc\x72\x79\x28\x5a\x1b\x53\x2d\xe0\x7b\xcd\x37\xf1\xe5\xcb\xa2\x66\x8b\x44\x16\x15\x33\x7c\x25\xe0\x92\x24\xb2\x34\x50\xa2\x1d\x87\x18\xd2\x1c\x06\x4b\xc3\x8d\x80\xe5\x1d\x43\xfb\xbf\x65\x0a\x42\x93\x07\x50\x1b\x9e\x40\x14\x76\xa2\x83\x00\x25\x2b\x20\xbe\xdc\x70\x68\x2a\xa9\xcc\x81\xcf\x86\xa7\x66\x1d\xa7\x60\xed\x16\xee\xc3\x27\xbc\xe4\x86\x33\xb1\xd0\x09\x13\x10\x5f\x0f\xf1\xb4\x69\xd1\xe9\x76\x1b\x3c\xd8\x1f\xfb\x7d\x14\x76\x2b\xb3\x28\xec\xa0\x46\x2b\x99\xb6\xbd\x72\xca\x37\x84\xa7\x31\xb5\x12\x50\xb4\x5b\x75\x12\x24\x42\x30\xad\x63\xba\x52\xac\x4c\x29\x59\x2b\xc8\x62\x1a\xd2\x43\x24\x51\xc8\x96\xb3\xd1\xa4\x16\xa3\xbd\x5b\x10\x7c\x89\x7e\x7a\xcb\xc2\x99\xd0\xe5\x68\x1a\x85\xa8\xf0\x8e\x85\x82\x4a\xa2\xc1\x3f\xf6\x75\xaa\x1f\x85\x43\xbc\x28\x44\x18\x7d\x22\x68\x6d\xf1\xe8\x44\x49\x21\x16\xac\x4c\xd6\x52\x0d\xc9\xff\x44\x97\x8f\xb2\xea\x92\x1e\xe1\xf7\x30\x0b\xa6\xbe\xa5\xb2\x29\x17\x96\x9d\x03\x22\x90\xc8\xdf\xbb\x2a\xec\xf7\xa7\xd1\x30\x0e\xaf\xcc\xa8\xed\x65\x75\x99\x18\x2e\x4b\x6f\x4e\xb6\xb3\x09\xb6\x30\x24\x77\xb0\x92\x28\x07\x02\x2f\x90\xd4\x06\x34\x91\xa5\x68\x89\x59\x03\xc1\x24\x0c\xc1\x42\x0a\x22\x33\xc2\xc8\xe0\x86\xb0\xcc\x80\xb2\x1a\xc7\xbe\x74\x05\x09\xcf\x38\xa4\xa4\x61\xdc\x90\x0a\x14\x97\x69\x30\xd1\x7a\x75\x92\xf6\x71\x5d\x76\xbe\x33\xc0\xf6\x29\x0a\x48\x39\x33\x60\x33\x25\x47\xcf\x86\x61\x50\x5e\x80\xac\xcd\xcd\xec\x44\xaa\xc0\xd4\xaa\x24\x13\xac\xc7\x3a\x83\x17\xd7\xc2\x2f\x86\xc4\x08\x82\x6b\xff\xac\x9e\x7d\x98\xca\x35\x2a\xe1\xab\x2e\x90\x6c\x7d\x26\xec\xe0\x52\x30\xcb\x49\xfc\xff\xf1\xed\xd3\xa3\x40\xf5\xb2\x16\xe2\xe6\x4d\x3d\x9e\x11\xef\xe2\x80\x13\xeb\x3c\x60\x55\x25\x5a\xaf\x87\xe0\xbb\x1c\xe7\xe7\x5d\xec\xdf\xc9\xd7\x96\xf5\x5e\x36\x98\xc2\xab\x7f\xf2\xe1\x03\xb9\x78\x9b\x60\xfb\x24\x02\x98\x7a\xec\x54\xbc\x5e\xf5\x8d\xe0\x23\x46\xdc\xb8\x06\x13\xc7\x52\x57\xec\xf9\x1b\x21\x2c\xe6\x3e\xb9\x1f\x02\xbc\x9f\x2e\x1d\x63\xb7\x98\xbb\x01\xfc\xe4\xe6\x0f\xf3\xc2\x3d\xd7\x95\x35\xc8\xc1\x7c\x16\x60\x7f\xde\xb6\x7f\xa6\xde\xd1\xa0\x1e\x27\x8a\x7d\xfe\xe0\x14\x88\x91\xf8\x57\x4d\xfb\xfb\x30\x46\xc0\xd2\xf4\xf3\x06\xdd\xfe\xc5\x35\x0e\x2b\x28\x8f\x26\x82\x27\xdf\xa8\x3f\xb6\x09\x58\xf9\xb9\x5e\x71\x82\xa0\x52\xee\x7d\x07\x19\xab\x85\xf1\xce\xe0\xee\x02\x7a\x57\x3e\xb9\x3a\x92\xee\x31\x0c\x13\x1a\xce\x00\x78\x94\x79\x2e\xa0\xb7\x25\x1d\xd0\x29\x8e\x86\x97\xb8\xf3\x9c\x41\xd0\xd9\x20\x84\xc9\x00\xbf\x8f\xc5\x4d\xae\xac\x90\x73\xaf\xf7\x5b\xb1\x1c\xfe\xfd\x92\x65\xd8\x1b\x64\xb7\x1b\x4b\xd1\x79\xc7\x1d\x71\x4e\x16\xc4\x7b\x5d\x46\xda\xf0\x85\xcb\x56\xf9\xea\x5c\xeb\x4c\x78\x77\x87\x4b\x90\x72\x5d\x09\xd6\xda\x29\x47\xc3\x25\xf9\x78\x45\x7e\x23\x74\x25\x24\x56\x80\xfc\x4a\x68\x29\x4b\xa0\x27\x94\x5d\x7f\x9c\x9f\xe1\x6d\x3f\x1f\xb8\xc7\xa3\xab\xdf\x5f\xdd\xe7\x76\x8b\x0d\x1b\xfc\x21\x25\xf2\xf9\xa9\x64\xa2\x35\x3c\xd1\xc3\xae\x3c\xdd\x89\x47\xa2\xb8\xaf\x7d\xe9\xe7\xbe\xf2\x99\x5f\xcc\xb7\xfc\x89\x1e\x39\xf8\xb2\xfa\x0a\x89\xa1\xcf\xb1\xba\xe1\x4f\xea\x39\xb6\xff\x76\xbb\x71\x6f\x99\x52\xec\x59\x71\xf0\x3d\xee\x5e\xbb\xdd\xd3\xf3\x3c\xa8\x6a\xbd\xf6\x5e\x37\xae\xf9\xde\x77\x42\x11\x5f\xff\x5c\x42\x43\xf0\xbc\x04\x04\xc4\x62\x1d\x24\x0a\xf0\xa3\xef\x7f\x4f\xce\xc7\xdd\xb0\x40\xe9\x38\x1a\xfa\xb6\x7d\x64\xf9\x3d\x5e\x06\x50\xe9\xe9\xea\xf9\x86\x05\x4c\xb7\x65\x12\x5f\xe3\x2f\xad\x92\x38\xbf\x29\xb0\xac\x0a\x55\xef\xf1\x34\x0d\x78\xa9\x41\x99\x5b\xc8\xa4\x02\xcf\xc2\x3c\x2a\x19\x32\xda\xf5\x82\x3f\x54\xd9\xa7\x1d\x5f\xd4\xa7\x61\xd8\x34\x4d\x90\x3b\x52\x70\x0e\x7b\x56\x02\xbc\xda\x84\xe3\xd7\x57\x8d\x9a\x39\x9b\x0c\x68\xce\x70\xc6\x1c\x22\xec\x50\x8a\xe7\xe4\x49\x65\xec\x3a\xab\x8d\xa4\x07\xd3\x62\xad\x34\xe0\x8d\x02\x65\xb6\x33\xed\x65\x87\x9e\xd4\xbb\x2b\x37\xaa\x61\x79\xa3\xb0\xbb\xb0\xe0\xfd\xc5\xdd\xd8\xfe\x0b\x00\x00\xff\xff\x6b\xad\x2f\x46\xc2\x09\x00\x00")

func assets_wrap_html_bytes() ([]byte, error) {
return bindata_read(
Expand All @@ -179,7 +179,7 @@ func assets_wrap_html() (*asset, error) {
return nil, err
}

info := bindata_file_info{name: "assets/wrap.html", size: 2301, mode: os.FileMode(420), modTime: time.Unix(1435066336, 0)}
info := bindata_file_info{name: "assets/wrap.html", size: 2498, mode: os.FileMode(420), modTime: time.Unix(1442281353, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand Down
6 changes: 3 additions & 3 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ func detectFormat(w http.ResponseWriter, r *http.Request) string {

switch format {
case "html":
contentType = "text/html"
contentType = "text/html; charset=utf-8"
case "markdown":
contentType = "text/markdown"
contentType = "text/markdown; charset=utf-8"
case "json":
contentType = "application/json"
contentType = "application/json; charset=utf-8"
}

w.Header().Set("user-agent", fmt.Sprintf(userAgent, progVersion))
Expand Down
4 changes: 2 additions & 2 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import "github.com/blang/semver"
const (
progMajor = 1
progMinor = 0
progPatch = 0
progReleaseLevel = "beta"
progPatch = 1
progReleaseLevel = "final"
progReleaseNum = 1
)

Expand Down

0 comments on commit a820898

Please sign in to comment.