diff options
Diffstat (limited to 'yuri.c')
-rw-r--r-- | yuri.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/yuri.c b/yuri.c index 3ffcc53..89c2a2f 100644 --- a/yuri.c +++ b/yuri.c @@ -257,6 +257,29 @@ uri_get_path(struct uri *u) return u->path; } +/* + * TODO: cleanup + */ +char * +uri_string_path(struct uri *u) +{ + struct uri *temp; + char *ret; + + temp = uri_new(); + if (temp == NULL) + return NULL; + temp->path = u->path; + temp->npath = u->npath; + + ret = uri_encode(temp); + free(temp); + if (ret == NULL) + return NULL; + + return ret; +} + int uri_get_npath(struct uri *u) { |