|
|
@ -157,6 +157,13 @@ func (web *WebAPI) GetObjectURL(r *http.Request, args *GetObjectURLArgs, reply * |
|
|
|
if !isAuthenticated(r) { |
|
|
|
if !isAuthenticated(r) { |
|
|
|
return errUnAuthorizedRequest |
|
|
|
return errUnAuthorizedRequest |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// See if object exists.
|
|
|
|
|
|
|
|
_, e := web.Client.StatObject(args.BucketName, args.ObjectName) |
|
|
|
|
|
|
|
if e != nil { |
|
|
|
|
|
|
|
return e |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
targetHost, err := getTargetHost(web.apiAddress, args.TargetHost) |
|
|
|
targetHost, err := getTargetHost(web.apiAddress, args.TargetHost) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return probe.WrapError(err) |
|
|
|
return probe.WrapError(err) |
|
|
|