Mercurial > hg > orthanc
comparison OrthancFramework/Sources/HttpServer/IWebDavBucket.cpp @ 4234:a38376b80cd1
WebDAV: by-studies and by-patients
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Oct 2020 13:38:44 +0200 |
parents | 688435755466 |
children | 6c3721ff284c |
comparison
equal
deleted
inserted
replaced
4233:ca2a55a62c81 | 4234:a38376b80cd1 |
---|---|
94 const std::string& parentPath, | 94 const std::string& parentPath, |
95 bool includeDisplayName) const | 95 bool includeDisplayName) const |
96 { | 96 { |
97 node.set_name("D:response"); | 97 node.set_name("D:response"); |
98 | 98 |
99 std::string s = AddTrailingSlash(parentPath) + GetName(); | 99 std::string s; |
100 Toolbox::UriEncode(s, AddTrailingSlash(parentPath) + GetName()); | |
100 node.append_child("D:href").append_child(pugi::node_pcdata).set_value(s.c_str()); | 101 node.append_child("D:href").append_child(pugi::node_pcdata).set_value(s.c_str()); |
101 | 102 |
102 pugi::xml_node propstat = node.append_child("D:propstat"); | 103 pugi::xml_node propstat = node.append_child("D:propstat"); |
103 | 104 |
104 static const HttpStatus status = HttpStatus_200_Ok; | 105 static const HttpStatus status = HttpStatus_200_Ok; |
178 pugi::xml_node prop = node.first_element_by_path("D:propstat/D:prop"); | 179 pugi::xml_node prop = node.first_element_by_path("D:propstat/D:prop"); |
179 prop.append_child("D:resourcetype").append_child("D:collection"); | 180 prop.append_child("D:resourcetype").append_child("D:collection"); |
180 | 181 |
181 //prop.append_child("D:getcontenttype").append_child(pugi::node_pcdata).set_value("httpd/unix-directory"); | 182 //prop.append_child("D:getcontenttype").append_child(pugi::node_pcdata).set_value("httpd/unix-directory"); |
182 | 183 |
183 std::string s = GetName(); | 184 prop.append_child("D:displayname").append_child(pugi::node_pcdata).set_value(GetName().c_str()); |
184 prop.append_child("D:displayname").append_child(pugi::node_pcdata).set_value(s.c_str()); | |
185 } | 185 } |
186 | 186 |
187 | 187 |
188 IWebDavBucket::Collection::~Collection() | 188 IWebDavBucket::Collection::~Collection() |
189 { | 189 { |