mirror of
https://github.com/minio/minio.git
synced 2025-04-04 20:00:31 -04:00
fix: bump the response header timeout for forwarder as well (#9994)
continuation of #9986, add more place where the lower timeout comes into effect.
This commit is contained in:
parent
60417950c7
commit
6136a963c8
@ -700,7 +700,7 @@ func (f bucketForwardingHandler) ServeHTTP(w http.ResponseWriter, r *http.Reques
|
|||||||
func setBucketForwardingHandler(h http.Handler) http.Handler {
|
func setBucketForwardingHandler(h http.Handler) http.Handler {
|
||||||
fwd := handlers.NewForwarder(&handlers.Forwarder{
|
fwd := handlers.NewForwarder(&handlers.Forwarder{
|
||||||
PassHost: true,
|
PassHost: true,
|
||||||
RoundTripper: NewGatewayHTTPTransport(),
|
RoundTripper: newGatewayHTTPTransport(1 * time.Hour),
|
||||||
Logger: func(err error) {
|
Logger: func(err error) {
|
||||||
logger.LogIf(GlobalContext, err)
|
logger.LogIf(GlobalContext, err)
|
||||||
},
|
},
|
||||||
|
@ -1187,7 +1187,7 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send PutObject request to appropriate instance (in federated deployment)
|
// Send PutObject request to appropriate instance (in federated deployment)
|
||||||
client, rerr := getRemoteInstanceClientLongTimeout(r, getHostFromSrv(dstRecords))
|
core, rerr := getRemoteInstanceClientLongTimeout(r, getHostFromSrv(dstRecords))
|
||||||
if rerr != nil {
|
if rerr != nil {
|
||||||
writeErrorResponse(ctx, w, toAPIError(ctx, rerr), r.URL, guessIsBrowserReq(r))
|
writeErrorResponse(ctx, w, toAPIError(ctx, rerr), r.URL, guessIsBrowserReq(r))
|
||||||
return
|
return
|
||||||
@ -1202,7 +1202,7 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
|||||||
ServerSideEncryption: dstOpts.ServerSideEncryption,
|
ServerSideEncryption: dstOpts.ServerSideEncryption,
|
||||||
UserTags: tag.ToMap(),
|
UserTags: tag.ToMap(),
|
||||||
}
|
}
|
||||||
remoteObjInfo, rerr := client.PutObjectWithContext(ctx, dstBucket, dstObject, srcInfo.Reader,
|
remoteObjInfo, rerr := core.PutObjectWithContext(ctx, dstBucket, dstObject, srcInfo.Reader,
|
||||||
srcInfo.Size, "", "", opts)
|
srcInfo.Size, "", "", opts)
|
||||||
if rerr != nil {
|
if rerr != nil {
|
||||||
writeErrorResponse(ctx, w, toAPIError(ctx, rerr), r.URL, guessIsBrowserReq(r))
|
writeErrorResponse(ctx, w, toAPIError(ctx, rerr), r.URL, guessIsBrowserReq(r))
|
||||||
@ -1879,13 +1879,13 @@ func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *htt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send PutObject request to appropriate instance (in federated deployment)
|
// Send PutObject request to appropriate instance (in federated deployment)
|
||||||
client, rerr := getRemoteInstanceClientLongTimeout(r, getHostFromSrv(dstRecords))
|
core, rerr := getRemoteInstanceClientLongTimeout(r, getHostFromSrv(dstRecords))
|
||||||
if rerr != nil {
|
if rerr != nil {
|
||||||
writeErrorResponse(ctx, w, toAPIError(ctx, rerr), r.URL, guessIsBrowserReq(r))
|
writeErrorResponse(ctx, w, toAPIError(ctx, rerr), r.URL, guessIsBrowserReq(r))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
partInfo, err := client.PutObjectPartWithContext(ctx, dstBucket, dstObject, uploadID, partID,
|
partInfo, err := core.PutObjectPartWithContext(ctx, dstBucket, dstObject, uploadID, partID,
|
||||||
srcInfo.Reader, srcInfo.Size, "", "", dstOpts.ServerSideEncryption)
|
srcInfo.Reader, srcInfo.Size, "", "", dstOpts.ServerSideEncryption)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r))
|
||||||
|
@ -632,7 +632,7 @@ func (web *webAPIHandlers) RemoveObject(r *http.Request, args *RemoveObjectArgs,
|
|||||||
}
|
}
|
||||||
return toJSONError(ctx, err, args.BucketName)
|
return toJSONError(ctx, err, args.BucketName)
|
||||||
}
|
}
|
||||||
core, err := getRemoteInstanceClient(r, getHostFromSrv(sr))
|
core, err := getRemoteInstanceClientLongTimeout(r, getHostFromSrv(sr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return toJSONError(ctx, err, args.BucketName)
|
return toJSONError(ctx, err, args.BucketName)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user