| 635 | } |
| 636 | |
| 637 | static void parse_reference_uri(const char *value, char **format, |
| 638 | char **payload) |
| 639 | { |
| 640 | const char *schema_end; |
| 641 | |
| 642 | schema_end = strstr(value, "://"); |
| 643 | if (!schema_end) { |
| 644 | *format = xstrdup(value); |
| 645 | *payload = NULL; |
| 646 | } else { |
| 647 | *format = xstrndup(value, schema_end - value); |
| 648 | *payload = xstrdup_or_null(schema_end + 3); |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | /* |
| 653 | * Record any new extensions in this function. |
no test coverage detected