Merge pull request #355 from dutchcoders/ISSUE-344

Issue 344
This commit is contained in:
Andrea Spacca 2021-03-09 14:34:27 +01:00 committed by GitHub
commit 3ed153904d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -383,7 +383,7 @@ type Metadata struct {
func MetadataForRequest(contentType string, r *http.Request) Metadata {
metadata := Metadata{
ContentType: contentType,
ContentType: strings.ToLower(contentType),
MaxDate: time.Time{},
Downloads: 0,
MaxDownloads: -1,
@ -1010,7 +1010,7 @@ func (s *Server) getHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("X-Remaining-Days", remainingDays)
if strings.Contains(contentType, "html") {
if disposition == "inline" && strings.Contains(contentType, "html") {
reader = ioutil.NopCloser(
bytes.NewReader(
bluemonday.UGCPolicy().