diff --git a/src/main/scala/com/ing/wbaa/rokku/proxy/handler/RequestHandlerS3.scala b/src/main/scala/com/ing/wbaa/rokku/proxy/handler/RequestHandlerS3.scala index 6de8fd9d..969618ac 100644 --- a/src/main/scala/com/ing/wbaa/rokku/proxy/handler/RequestHandlerS3.scala +++ b/src/main/scala/com/ing/wbaa/rokku/proxy/handler/RequestHandlerS3.scala @@ -8,14 +8,14 @@ import akka.http.scaladsl.model.headers.RawHeader import com.amazonaws.Request import com.amazonaws.auth.BasicAWSCredentials import com.ing.wbaa.rokku.proxy.config.StorageS3Settings -import com.ing.wbaa.rokku.proxy.data.{RequestId, S3Request, User} +import com.ing.wbaa.rokku.proxy.data.{ RequestId, S3Request, User } import com.ing.wbaa.rokku.proxy.handler.exception.RokkuThrottlingException import com.ing.wbaa.rokku.proxy.provider.aws.S3Client import com.ing.wbaa.rokku.proxy.provider.aws.SignatureHelpersCommon.awsVersion import com.ing.wbaa.rokku.proxy.queue.UserRequestQueue -import scala.concurrent.{ExecutionContext, Future} -import scala.util.{Failure, Success} +import scala.concurrent.{ ExecutionContext, Future } +import scala.util.{ Failure, Success } trait RequestHandlerS3 extends S3Client with UserRequestQueue { @@ -81,17 +81,20 @@ trait RequestHandlerS3 extends S3Client with UserRequestQueue { protected[this] def fireRequestToS3(request: HttpRequest)(implicit id: RequestId): Future[HttpResponse] = { logger.info(s"Request sent to backend storage: method: {} uri: {}, {}", request.method.value, request.uri.toString(), request) println(request.uri.path) - if(request.method == HttpMethods.PUT && request.uri.path.startsWith(Path("/acckz")) ) { + if (request.method == HttpMethods.PUT && request.uri.path.startsWith(Path("/acckz"))) { + request.entity.discardBytes() Future(HttpResponse.apply(StatusCodes.BadGateway, entity = HttpEntity(ContentTypes.`text/html(UTF-8)`, "\n