Open markusju opened 4 years ago
Well, I just tried patching this, which turned out to be really easy. => Search and replace "text/json" with "application/json".
However, it turns out /api/objects/validated
in rpki-validator-3 does not produce data in a proper schema (yet) for gortr. This is another issue which I have raised at this project.
Nevertheless the MIME type is invalid and should most likely be corrected to avoid future incompatibilities.
I believe the "text/json" was for ripe-rpki-validator 2 but I may be wrong. I can make it available as a CLI argument. I agree on the rest, there is no standard at the moment, and the ASNs format has been changed from "AS65001" to a JSON integer.
Which version of GoRTR are you using? Could you share the JSON file as well?
I believe the "text/json" was for ripe-rpki-validator 2 but I may be wrong. I can make it available as a CLI argument. I agree on the rest, there is no standard at the moment, and the ASNs format has been changed from "AS65001" to a JSON integer.
Perhaps standardising this format (and the headers) would be good.
In my eyes a RPKI validation server should not be intolerant of Content-Type
s however, in practice, if code is implemented in a framework that has dynamic handling of MIME types they will be.
Made a change to application/json
by default but client can configure the Accept header.
Currently HTTP Requests to a RPKI validation server are made with the header option "Accept: text/json". This is causing issues with APIs of some RPKI servers that are particularly picky about this. For example the
/api/objects/validated
endpoint of RIPE NCC's rpki-validator-3 does not like "text/json"."text/json" is not a valid MIME type after all and should be changed to "application/json", possibly avoiding issues with future implementations of RPKI validation servers. (rfc8259)