fix response href webdav

Sun, 19 Jan 2020 09:31:45 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 19 Jan 2020 09:31:45 +0100
branch
webdav
changeset 236
e81d3e517b57
parent 235
4990147c58d0
child 237
ee1680ef1ef2

fix response href

src/server/public/webdav.h file | annotate | diff | comparison | revisions
src/server/webdav/operation.c file | annotate | diff | comparison | revisions
src/server/webdav/webdav.c file | annotate | diff | comparison | revisions
--- a/src/server/public/webdav.h	Sun Jan 19 09:01:39 2020 +0100
+++ b/src/server/public/webdav.h	Sun Jan 19 09:31:45 2020 +0100
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 2019 Olaf Wintermann. All rights reserved.
+ * Copyright 2020 Olaf Wintermann. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
--- a/src/server/webdav/operation.c	Sun Jan 19 09:01:39 2020 +0100
+++ b/src/server/webdav/operation.c	Sun Jan 19 09:31:45 2020 +0100
@@ -238,7 +238,7 @@
             size_t childpathlen = cur_elm->pathlen + 1 + child_len;
             
             // propfind for this child
-            if(webdav_op_propfind_begin(op, newpath, dir, &f.stat)) {
+            if(webdav_op_propfind_begin(op, newhref, dir, &f.stat)) {
                 err = 1;
                 break;
             }
--- a/src/server/webdav/webdav.c	Sun Jan 19 09:01:39 2020 +0100
+++ b/src/server/webdav/webdav.c	Sun Jan 19 09:31:45 2020 +0100
@@ -258,7 +258,7 @@
     int ret = REQ_PROCEED;
     
     // create WebdavResource object for requested resource
-    if(!webdav_op_propfind_begin(op, path, NULL, statptr)) {
+    if(!webdav_op_propfind_begin(op, uri, NULL, statptr)) {
         // propfind for the requested resource was successful
         
         // usevfsdir is TRUE if
@@ -428,8 +428,6 @@
 {
     DefaultWebdavData *data = request->userdata;
     
-    // TODO: rework
-    
     // add all requested vfs properties like getcontentlength ...
     if(webdav_add_vfs_properties(
             resource,
@@ -440,13 +438,6 @@
         return 1;
     }
     
-    // all remaining properties are not available
-    WebdavPList *p = request->properties;
-    while(p) {
-        resource->addproperty(resource, p->property, 404);
-        p = p->next;
-    }
-    
     return 0;
 }
 

mercurial