You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Neal_Hu (JIRA)" <ji...@apache.org> on 2016/04/14 15:17:25 UTC
[jira] [Commented] (CXF-6320) Zero-length entity should throw 400
on pre-packaged provider
[ https://issues.apache.org/jira/browse/CXF-6320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241126#comment-15241126 ]
Neal_Hu commented on CXF-6320:
------------------------------
Sergey, would you please migrate this jira from id xingjhu@cn.ibm.com to nbqyqx@163.com.
> Zero-length entity should throw 400 on pre-packaged provider
> ------------------------------------------------------------
>
> Key: CXF-6320
> URL: https://issues.apache.org/jira/browse/CXF-6320
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.0.3
> Environment: Windows
> Reporter: Neal_Hu
> Assignee: Sergey Beryozkin
> Fix For: 3.1.0, 3.0.5
>
>
> In jsp339 spec 4.2.4 Standard Entity Providers
> java.lang.Boolean, java.lang.Character, java.lang.Number Only for text/plain. Corresponding
> primitive types supported via boxing/unboxing conversion.
> When reading zero-length message entities all pre-packaged MessageBodyReader implementations, except
> the JAXB one and those for the (boxed) primitive types above, MUST create a corresponding Java
> object that represents zero-length data. The pre-packaged JAXB and the pre-packaged primitive type
> MessageBodyReader implementations MUST throw a NoContentException for zero-length message
> entities.
> Request
> Content-Type:text/plain
> Accept:\*/\*
> Body:
> Method:POST
> The CTS case resource:
> @Path("character")
> @POST
> public Character character(Character character) {
> return character;
> }
> The case expect 400 instead of 200.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)