Changeset 50 in code
- Timestamp:
- Nov 29, 2016, 10:12:48 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/morty.go
r47 r50 125 125 []byte("date"), 126 126 []byte("last-modified"), 127 []byte("refresh"), // URL rewrite 127 []byte("refresh"), // URL rewrite 128 128 // []byte("location"), TODO URL rewrite 129 129 []byte("content-language"), … … 285 285 } 286 286 287 ctx.SetContentType(fmt.Sprintf("%s; charset=UTF-8", contentInfo[0])) 287 if bytes.Contains(contentType, []byte("xhtml")) { 288 ctx.SetContentType("text/html; charset=UTF-8") 289 } else { 290 ctx.SetContentType(fmt.Sprintf("%s; charset=UTF-8", contentInfo[0])) 291 } 288 292 289 293 switch {
Note:
See TracChangeset
for help on using the changeset viewer.