Skip to content

Commit

Permalink
Use native net/http instead of custom package
Browse files Browse the repository at this point in the history
#75

Signed-off-by: JT Archie <jarchie@pivotal.io>
  • Loading branch information
Chris Hendrix authored and JT Archie committed Jul 20, 2017
1 parent b41473d commit 69d54ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions in/archive.go
Expand Up @@ -9,7 +9,7 @@ import (
"os/exec"
"strings"

"bitbucket.org/taruti/mimemagic"
"net/http"
)

var archiveMimetypes = []string{
Expand All @@ -29,7 +29,7 @@ func mimetype(r *bufio.Reader) (string, error) {
return "", errors.New("cannot determine mimetype from empty bytes")
}

return mimemagic.Match("", bs), nil
return http.DetectContentType(bs), nil
}

func archiveMimetype(filename string) string {
Expand Down

1 comment on commit 69d54ad

@krishicks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, cool!

Please sign in to comment.