MCPcopy Create free account
hub / github.com/apache/httpd / argstr_to_table

Function argstr_to_table

server/util_script.c:933–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

931}
932
933static void
934argstr_to_table(char *str, apr_table_t *parms)
935{
936 char *key;
937 char *value;
938 char *strtok_state;
939
940 if (str == NULL) {
941 return;
942 }
943
944 key = apr_strtok(str, "&", &strtok_state);
945 while (key) {
946 value = strchr(key, '=');
947 if (value) {
948 *value = '\0'; /* Split the string in two */
949 value++; /* Skip passed the = */
950 }
951 else {
952 value = "1";
953 }
954 ap_unescape_url(key);
955 ap_unescape_url(value);
956 apr_table_set(parms, key, value);
957 key = apr_strtok(NULL, "&", &strtok_state);
958 }
959}
960
961AP_DECLARE(void) ap_args_to_table(request_rec *r, apr_table_t **table)
962{

Callers 1

ap_args_to_tableFunction · 0.70

Calls 1

ap_unescape_urlFunction · 0.85

Tested by

no test coverage detected