Mercurial > hg > orthanc
comparison OrthancFramework/Sources/HttpServer/IWebDavBucket.cpp @ 4247:112951171852
comments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Oct 2020 10:46:05 +0200 |
parents | 6c3721ff284c |
children | f047e2734655 |
comparison
equal
deleted
inserted
replaced
4246:6c3721ff284c | 4247:112951171852 |
---|---|
122 propstat.append_child("D:status").append_child(pugi::node_pcdata).set_value(s.c_str()); | 122 propstat.append_child("D:status").append_child(pugi::node_pcdata).set_value(s.c_str()); |
123 | 123 |
124 pugi::xml_node prop = propstat.append_child("D:prop"); | 124 pugi::xml_node prop = propstat.append_child("D:prop"); |
125 prop.append_child("D:displayname").append_child(pugi::node_pcdata).set_value(displayName.c_str()); | 125 prop.append_child("D:displayname").append_child(pugi::node_pcdata).set_value(displayName.c_str()); |
126 | 126 |
127 // IMPORTANT: The "Z" suffix is mandatory on Windows >= 7 (it indicates UTC) | 127 // IMPORTANT: Adding the "Z" suffix is mandatory on Windows >= 7 (it indicates UTC) |
128 assert(!creationTime.is_special()); | |
128 s = boost::posix_time::to_iso_extended_string(creationTime) + "Z"; | 129 s = boost::posix_time::to_iso_extended_string(creationTime) + "Z"; |
129 prop.append_child("D:creationdate").append_child(pugi::node_pcdata).set_value(s.c_str()); | 130 prop.append_child("D:creationdate").append_child(pugi::node_pcdata).set_value(s.c_str()); |
130 | 131 |
132 assert(!modificationTime.is_special()); | |
131 s = boost::posix_time::to_iso_extended_string(modificationTime) + "Z"; | 133 s = boost::posix_time::to_iso_extended_string(modificationTime) + "Z"; |
132 prop.append_child("D:getlastmodified").append_child(pugi::node_pcdata).set_value(s.c_str()); | 134 prop.append_child("D:getlastmodified").append_child(pugi::node_pcdata).set_value(s.c_str()); |
133 | 135 |
134 #if 0 | 136 #if 0 |
135 // Maybe used by davfs2 | 137 // Maybe used by davfs2 |
243 folder = parentPath.substr(lastSlash + 1); | 245 folder = parentPath.substr(lastSlash + 1); |
244 } | 246 } |
245 | 247 |
246 std::string href; | 248 std::string href; |
247 Toolbox::UriEncode(href, AddTrailingSlash(parentPath)); | 249 Toolbox::UriEncode(href, AddTrailingSlash(parentPath)); |
248 FormatInternal(self, href, folder, GetNow(), GetNow()); | 250 |
251 boost::posix_time::ptime now = GetNow(); | |
252 FormatInternal(self, href, folder, now, now); | |
249 | 253 |
250 pugi::xml_node prop = self.first_element_by_path("D:propstat/D:prop"); | 254 pugi::xml_node prop = self.first_element_by_path("D:propstat/D:prop"); |
251 prop.append_child("D:resourcetype").append_child("D:collection"); | 255 prop.append_child("D:resourcetype").append_child("D:collection"); |
252 } | 256 } |
253 | 257 |