You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "François Courtault (Jira)" <ji...@apache.org> on 2020/12/10 15:59:00 UTC
[jira] [Updated] (TOMEE-2940) No header checks
[ https://issues.apache.org/jira/browse/TOMEE-2940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
François Courtault updated TOMEE-2940:
--------------------------------------
Description:
Hello,
Let's say that I have a method in a REST resouce file, with the following annotations:
{color:#808000}@POST{color}
{color:#808000}@Consumes{color}({{color:#008000}"application/json"})
@Produces{color}(\{"application/json"})
Response myMethod(final MyRequest myRequest) \{ ....}
If use curl to target this method with the following header,I got the following responses:
* *-H 'Content-Type: application/-' : HTTP 415 error*
* *-H 'Content-Type: -' : no HTTP error, expected to get the same error than above*
* *-H 'Content-Type: -'* *and* *'Content-Length: 0' with a payload length > 0: no error except if we call myRequest.doSomthing() => NPE*****
Don't think it's a good behavior, right ?
Best Regards.
was:
Hello,
Let's say that I have a method in a REST resouce file, with the following annotations:
{color:#808000}@POST{color}
{color:#808000}@Consumes{color}({ {color:#008000}"application/json" {color}})
{color:#808000}@Produces{color}({ {color:#008000}"application/json" {color}})
Response myMethod(final MyRequest myRequest) \{ ....}
If use curl to target this method with the following header,I got the following responses:
* *-H 'Content-Type: application/-' : HTTP 415 error*
* *-H 'Content-Type: -' : no HTTP error, expected to get the same error than above*
* *-H 'Content-Type: -'* *and* *'Content-Length: 0' with a payload length > 0: no error except if we call myRequest.doSomthing() => NPE*****
Don't think it's a good behavior, right ?
Best Regards.
> No header checks
> ----------------
>
> Key: TOMEE-2940
> URL: https://issues.apache.org/jira/browse/TOMEE-2940
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Affects Versions: 8.0.5
> Reporter: François Courtault
> Priority: Critical
>
> Hello,
> Let's say that I have a method in a REST resouce file, with the following annotations:
> {color:#808000}@POST{color}
> {color:#808000}@Consumes{color}({{color:#008000}"application/json"})
> @Produces{color}(\{"application/json"})
> Response myMethod(final MyRequest myRequest) \{ ....}
> If use curl to target this method with the following header,I got the following responses:
> * *-H 'Content-Type: application/-' : HTTP 415 error*
> * *-H 'Content-Type: -' : no HTTP error, expected to get the same error than above*
> * *-H 'Content-Type: -'* *and* *'Content-Length: 0' with a payload length > 0: no error except if we call myRequest.doSomthing() => NPE*****
> Don't think it's a good behavior, right ?
> Best Regards.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)