Skip to content

Commit

Permalink
Change import httplex to httpguts. (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
h8liu authored and harshavardhana committed May 7, 2018
1 parent aa6cfd6 commit 6f8ee66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api-put-object.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/minio/minio-go/pkg/encrypt"
"github.com/minio/minio-go/pkg/s3utils"
"golang.org/x/net/lex/httplex"
"golang.org/x/net/http/httpguts"
)

// PutObjectOptions represents options specified by user for PutObject call
Expand Down Expand Up @@ -101,10 +101,10 @@ func (opts PutObjectOptions) Header() (header http.Header) {
// validate() checks if the UserMetadata map has standard headers or and raises an error if so.
func (opts PutObjectOptions) validate() (err error) {
for k, v := range opts.UserMetadata {
if !httplex.ValidHeaderFieldName(k) || isStandardHeader(k) || isSSEHeader(k) || isStorageClassHeader(k) {
if !httpguts.ValidHeaderFieldName(k) || isStandardHeader(k) || isSSEHeader(k) || isStorageClassHeader(k) {
return ErrInvalidArgument(k + " unsupported user defined metadata name")
}
if !httplex.ValidHeaderFieldValue(v) {
if !httpguts.ValidHeaderFieldValue(v) {
return ErrInvalidArgument(v + " unsupported user defined metadata value")
}
}
Expand Down

0 comments on commit 6f8ee66

Please sign in to comment.