[
https://issues.apache.org/jira/browse/HDDS-17925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gargi Jaiswal reassigned HDDS-17925:
------------------------------------
Assignee: Gargi Jaiswal
> S3G returns 500 when response-content-type is not a valid media type
> --------------------------------------------------------------------
>
> Key: HDDS-17925
> URL: https://issues.apache.org/jira/browse/HDDS-17925
> Project: Apache Ozone
> Issue Type: Bug
> Components: S3
> Reporter: Huang Kuan Hao
> Assignee: Gargi Jaiswal
> Priority: Major
>
> GetObject returns 500 when the {{response-content-type}} query parameter is
> not a valid media type, such as {{foo}}. HeadObject does the same once
> HDDS-17920 makes it apply that parameter.
> S3G copies the value into the response Content-Type, and Jersey fails to
> parse it while processing the response:
> {code}
> Caused by: java.lang.IllegalArgumentException: Error parsing media type 'foo'
> at
> org.glassfish.jersey.message.internal.MediaTypeProvider.fromString(MediaTypeProvider.java:69)
> at
> org.glassfish.jersey.message.internal.MediaTypeProvider.fromString(MediaTypeProvider.java:37)
> at
> org.glassfish.jersey.message.internal.MessageHeaderMethods.singleHeader(MessageHeaderMethods.java:429)
> at
> org.glassfish.jersey.message.internal.OutboundMessageContext.lambda$mediaTypeCache$0(OutboundMessageContext.java:211)
> at
> org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:317)
> at
> org.glassfish.jersey.message.internal.OutboundMessageContext.getMediaType(OutboundMessageContext.java:206)
> at
> org.glassfish.jersey.server.ContainerResponse.getMediaType(ContainerResponse.java:186)
> at
> org.glassfish.jersey.server.internal.routing.MethodSelectingRouter$3.apply(MethodSelectingRouter.java:445)
> {code}
> A stored Content-Type can't hit this, because PutObject and
> CreateMultipartUpload with {{Content-Type: foo}} already fail with 400.
> Expected: not a 500. It still needs checking whether AWS returns the value
> as-is or rejects it with 400.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]