Skip to content

Commit

Permalink
azure: revendor + remove hacky solution in is404
Browse files Browse the repository at this point in the history
Removing the temporary workaround in is404() method by re-vendoring
the azure-sdk-for-go.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
  • Loading branch information
ahmetb authored and dmcgowan committed Jan 10, 2017
1 parent 129ad8e commit 0a1ce58
Show file tree
Hide file tree
Showing 7 changed files with 998 additions and 113 deletions.
8 changes: 0 additions & 8 deletions registry/storage/driver/azure/azure.go
Expand Up @@ -397,14 +397,6 @@ func (d *driver) listBlobs(container, virtPath string) ([]string, error) {
}

func is404(err error) bool {
// handle the case when the request was a HEAD and service error could not
// be parsed, such as "storage: service returned without a response body
// (404 The specified blob does not exist.)"
if strings.Contains(fmt.Sprintf("%v", err), "404 The specified blob does not exist") {
return true
}

// common case
statusCodeErr, ok := err.(azure.AzureStorageServiceError)
return ok && statusCodeErr.StatusCode == http.StatusNotFound
}
Expand Down

0 comments on commit 0a1ce58

Please sign in to comment.