Skip to content

Commit

Permalink
fix pipeline problem related to request mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Elbahkiry committed Sep 5, 2024
1 parent 23e115e commit dd2d3c8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions service/services/echo/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ func (e *Echo) Processing(partial bool, IcapHeader textproto.MIMEHeader) (int, i

//check if the file extension is a bypass extension
//if yes we will not modify the file, and we will return 204 No modifications
isProcess, _, _ := e.generalFunc.CheckTheExtension(fileExtension, e.extArrs,
isProcess, icapStatus, httpMsg := e.generalFunc.CheckTheExtension(fileExtension, e.extArrs,
e.processExts, e.rejectExts, e.bypassExts, e.return400IfFileExtRejected, isGzip,
e.serviceName, e.methodName, EchoIdentifier, e.httpMsg.Request.RequestURI, reqContentType, bytes.NewBuffer(file), utils.BlockPagePath, fileSize)
// if !isProcess {
// logging.Logger.Info(utils.PrepareLogMsg(e.xICAPMetadata, e.serviceName+" service has stopped processing"))
// msgHeadersAfterProcessing = e.generalFunc.LogHTTPMsgHeaders(e.methodName)
// return icapStatus, httpMsg, serviceHeaders, msgHeadersBeforeProcessing,
// msgHeadersAfterProcessing, vendorMsgs
// }
if !isProcess && e.methodName == utils.ICAPModeReq {
logging.Logger.Info(utils.PrepareLogMsg(e.xICAPMetadata, e.serviceName+" service has stopped processing"))
msgHeadersAfterProcessing = e.generalFunc.LogHTTPMsgHeaders(e.methodName)
return icapStatus, httpMsg, serviceHeaders, msgHeadersBeforeProcessing,
msgHeadersAfterProcessing, vendorMsgs
}

//check if the file size is greater than max file size of the service
//if yes we will return 200 ok or 204 no modification, it depends on the configuration of the service
Expand Down

0 comments on commit dd2d3c8

Please sign in to comment.