Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions swift.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ type Connection struct {
// Workarounds for non-compliant servers that don't always return opts.Limit items per page
FetchUntilEmptyPage bool // Always fetch unless we received an empty page
PartialPageFetchThreshold int // Fetch if the current page is this percentage of opts.Limit
// Extra Headers for Continer HEAD reqeust
ExtraHeadersForContinerHEAD Headers `json:"-" xml:"-"`
// Extra Headers for Object HEAD reqeust
ExtraHeadersForObjectHEAD Headers `json:"-" xml:"-"`
}

// setFromEnv reads the value that param points to (it must be a
Expand Down Expand Up @@ -1335,6 +1339,7 @@ func (c *Connection) Container(ctx context.Context, container string) (info Cont
Operation: "HEAD",
ErrorMap: ContainerErrorMap,
NoResponse: true,
Headers: c.ExtraHeadersForContinerHEAD,
})
if err != nil {
return
Expand Down Expand Up @@ -2126,6 +2131,7 @@ func (c *Connection) objectBase(ctx context.Context, container string, objectNam
Operation: "HEAD",
ErrorMap: objectErrorMap,
NoResponse: true,
Headers: c.ExtraHeadersForObjectHEAD,
})
if err != nil {
return
Expand Down