Skip to content

Commit

Permalink
Fix error related to empty responses for requests with Accept header (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
micossow authored Jul 25, 2024
1 parent 69bbec4 commit e8e8218
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.elasticmq.rest.sqs.directives

import org.apache.pekko.http.scaladsl.model.ContentTypes._
import org.apache.pekko.http.scaladsl.model.HttpEntity
import org.apache.pekko.http.scaladsl.model.{HttpEntity, HttpResponse, StatusCodes}
import org.apache.pekko.http.scaladsl.server.{Directives, RequestContext, Route}
import org.elasticmq.rest.sqs.Constants._

Expand Down Expand Up @@ -44,7 +44,8 @@ trait RespondDirectives {

def emptyResponse(xmlTagName: String)(implicit marshallerDependencies: MarshallerDependencies): server.Route = {
marshallerDependencies.protocol match {
case AWSProtocol.`AWSJsonProtocol1.0` => complete(200, HttpEntity.Empty)
case AWSProtocol.`AWSJsonProtocol1.0` =>
complete(HttpResponse(status = StatusCodes.OK, entity = HttpEntity.Empty))
case _ =>
respondWith {
<wrapper>
Expand Down

0 comments on commit e8e8218

Please sign in to comment.