THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Is the media-type application/problem+json supported?

  • retag add tags

Hi,

I have the latest release - Version 3.0.3 (v3.0.3-0-g6130b92b0ec6) - and it seems Wireshark is not able to decode a json body if the Content-Type is application/problem+json. The header is properly decoded but the body is not.

the header was decoded as:

Header: content-type: application/problem+json
    Name Length: 12
    Name: content-type
    Value Length: 24
    Value: application/problem+json
    content-type: application/problem+json
    [Unescaped: application/problem+json]
    Representation: Literal Header Field with Incremental Indexing - Indexed Name
    Index: 31

Is Wireshark able to decode a application/problem+json as defined in RFC 7807, with some additional extension members? Does Wireshak keep a matrix compliance list with all media-types supported?

thank you.

Jose's avatar
1
Jose
asked 2019-08-13 09:25:50 +0000
grahamb's avatar
23.8k
grahamb
updated 2019-08-13 14:53:53 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Does Wireshark keep a matrix compliance list with all media-types supported?

No

Is Wireshark able to decode a application/problem+json as defined in RFC 7807,

Wireshark could be extended to "parse" the json content e.g have the http dissector call the json dissector for that media type. If this is something you want please raise a bug report requesting an enhancement and attach a small pcap for testing purposes.

Anders's avatar
5k
Anders
answered 2019-08-13 11:54:42 +0000
grahamb's avatar
23.8k
grahamb
updated 2019-08-13 11:59:45 +0000
edit flag offensive 0 remove flag delete link

Comments

Thank you for your prompt response. I took a sneak peek on the https://github.com/wireshark/wireshar... and it seems the media-types are restricted to:

dissector_add_string("media_type", "application/json", json_handle); /* RFC 4627 / 
dissector_add_string("media_type", "application/json-rpc", json_handle); /* JSON-RPC over HTTP */ 
dissector_add_string("media_type", "application/jsonrequest", json_handle); /* JSON-RPC over HTTP */ 
dissector_add_string("media_type", "application/dds-web+json", json_handle); /* DDS Web Integration Service over HTTP */
dissector_add_string("media_type", "application/vnd.oma.lwm2m+json", json_handle); /* LWM2M JSON over CoAP */

So, as per your comment, currently Wireshark is not able to decode a application/problem+json media type and even if I have the a schema defined in a yaml file I'm not able to feed it in for Wireshark to "parse" it.

for your information, I've come across this issue while troubleshooting the AUSF service for 5G, which is a authentication service defined here http://www.3gpp.org/ftp//Specs/archiv...

Regards José

Jose's avatar Jose (2019-08-13 12:23:10 +0000) edit

FYI, the canonical reference for Wireshark source code is here, the GitHub repo is a mirror that may or may not be up to date.

Patches to fix the issue gratefully accepted as well, see the wiki page on Submitting Patches.

grahamb's avatar grahamb (2019-08-13 12:27:48 +0000) edit

Added https://code.wireshark.org/review/#/c... but without a trace it can't be verified.

Anders's avatar Anders (2019-08-13 13:17:40 +0000) edit

If the change will be reflected on the daily builds at https://www.wireshark.org/download/au... I can test it tomorrow, if you wish.

Jose's avatar Jose (2019-08-13 13:26:38 +0000) edit

Ok, I have checked in the patch now.

Anders's avatar Anders (2019-08-13 13:39:31 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer