BUGFIX: Content-Type, Nil Raw Body Edge Case, Links
FIXES: * There was an edge case where a raw body for HTML would potentially result in a nil byte slice exception. This has been fixed. (I don't even know if it was possible, I just made sure it wasn't.) * The links browser is now explicitly returned as HTML and properly detected as a "browser". * Hyperlinks for links, w3m added to Usage page. * Content-Type is now always set correctly; there were cases where it was improperly returning e.g. text/plain for JSON.
This commit is contained in:
@@ -79,10 +79,15 @@ var (
|
||||
mediaJSON: json.MarshalIndent,
|
||||
mediaXML: xml.MarshalIndent,
|
||||
}
|
||||
// valid MIMEs.
|
||||
okAcceptMime []string = []string{
|
||||
mediaJSON,
|
||||
mediaXML,
|
||||
mediaYAML,
|
||||
mediaHTML,
|
||||
}
|
||||
// These are actually HTML.
|
||||
htmlOverride map[string]bool = map[string]bool{
|
||||
"Links": true,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user