~panda-roux/MoonGem

7a7d3f600c26de996c725ee5080b048944313e12 — panda-roux 2 months ago 3129520
don't copy the path if it doesn't exist
1 files changed, 4 insertions(+), 1 deletions(-)

M src/uri.c
M src/uri.c => src/uri.c +4 -1
@@ 124,7 124,10 @@ uri_t* create_uri(const char* buf) {
  uri->raw_path = extract_part(&matches[URI_PATH], buf);
  uri->input = extract_part(&matches[URI_INPUT], buf);

  uri->path = strdup(uri->raw_path);
  if (uri->raw_path != NULL) {
    uri->path = strdup(uri->raw_path);
  }

  standardize_path(&uri->path);

  // path can be null if EOM occurred trying to add default doc