Ask Your Question
0

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

asked 2019-08-13 09:25:50 +0000

Jose gravatar image

updated 2019-08-13 14:53:53 +0000

grahamb gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-08-13 11:54:42 +0000

Anders gravatar image

updated 2019-08-13 11:59:45 +0000

grahamb gravatar image

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.

edit flag offensive delete link more

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 gravatar imageJose ( 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 gravatar imagegrahamb ( 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 gravatar imageAnders ( 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 gravatar imageJose ( 2019-08-13 13:26:38 +0000 )edit

Ok, I have checked in the patch now.

Anders gravatar imageAnders ( 2019-08-13 13:39:31 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-08-13 09:25:50 +0000

Seen: 75 times

Last updated: Aug 13