summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/magiconair/properties/load.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/magiconair/properties/load.go')
-rw-r--r--vendor/github.com/magiconair/properties/load.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/magiconair/properties/load.go b/vendor/github.com/magiconair/properties/load.go
index ab953253..c83c2dad 100644
--- a/vendor/github.com/magiconair/properties/load.go
+++ b/vendor/github.com/magiconair/properties/load.go
@@ -132,11 +132,12 @@ func (l *Loader) LoadURL(url string) (*Properties, error) {
}
ct := resp.Header.Get("Content-Type")
+ ct = strings.Join(strings.Fields(ct), "")
var enc Encoding
switch strings.ToLower(ct) {
- case "text/plain", "text/plain; charset=iso-8859-1", "text/plain; charset=latin1":
+ case "text/plain", "text/plain;charset=iso-8859-1", "text/plain;charset=latin1":
enc = ISO_8859_1
- case "", "text/plain; charset=utf-8":
+ case "", "text/plain;charset=utf-8":
enc = UTF8
default:
return nil, fmt.Errorf("properties: invalid content type %s", ct)