[jboss-jira] [JBoss JIRA] (WFWIP-151) HTTP Verb OPTIONS requires to have Accept header defined, response should provide some guidance about this
Rostislav Svoboda (Jira)
issues at jboss.org
Tue Nov 13 11:19:00 EST 2018
[ https://issues.jboss.org/browse/WFWIP-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rostislav Svoboda updated WFWIP-151:
------------------------------------
Description:
HTTP Verb OPTIONS requires to have Accept header defined
{code}
$ curl -X OPTIONS http://127.0.0.1:10090/metrics/vendor
No exporter found for method OPTIONS and media type
{code}
I have to specify json mediatype
{code}
curl -X OPTIONS -H "Accept: application/json" http://127.0.0.1:10090/metrics/vendor
{code}
I was expecting that I get -the json response or at least more- helpful message.
OpenLiberty returns
{code}
Error 406: CWMMC0000I: The accept header format */* is incorrect.
{code}
which at least points user to define proper header
Update:
Spec requires header to be defined, so WF could be a bit more helpful in the response message
{code}
The implementation must return a 406 response code if the request’s HTTP Accept header
for an OPTIONS request does not match application/json.
{code}
was:
HTTP Verb OPTIONS requires to have Accept header defined
{code}
$ curl -X OPTIONS http://127.0.0.1:10090/metrics/vendor
No exporter found for method OPTIONS and media type
{code}
I have to specify json mediatype
{code}
curl -X OPTIONS -H "Accept: application/json" http://127.0.0.1:10090/metrics/vendor
{code}
I was expecting that I get -the json response or at least more- helpful message.
OpenLiberty returns {{Error 406: CWMMC0000I: The accept header format */* is incorrect.}} which at least points user to define proper header
Update: Spec requires header to be defined, so WF could be a bit more helpful in the response message
{code}
The implementation must return a 406 response code if the request’s HTTP Accept header
for an OPTIONS request does not match application/json.
{code}
> HTTP Verb OPTIONS requires to have Accept header defined, response should provide some guidance about this
> ----------------------------------------------------------------------------------------------------------
>
> Key: WFWIP-151
> URL: https://issues.jboss.org/browse/WFWIP-151
> Project: WildFly WIP
> Issue Type: Bug
> Components: MP Metrics
> Reporter: Rostislav Svoboda
> Assignee: Jeff Mesnil
> Priority: Major
>
> HTTP Verb OPTIONS requires to have Accept header defined
> {code}
> $ curl -X OPTIONS http://127.0.0.1:10090/metrics/vendor
> No exporter found for method OPTIONS and media type
> {code}
> I have to specify json mediatype
> {code}
> curl -X OPTIONS -H "Accept: application/json" http://127.0.0.1:10090/metrics/vendor
> {code}
> I was expecting that I get -the json response or at least more- helpful message.
> OpenLiberty returns
> {code}
> Error 406: CWMMC0000I: The accept header format */* is incorrect.
> {code}
> which at least points user to define proper header
> Update:
> Spec requires header to be defined, so WF could be a bit more helpful in the response message
> {code}
> The implementation must return a 406 response code if the request’s HTTP Accept header
> for an OPTIONS request does not match application/json.
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list