179 if(!str) { |
179 if(!str) { |
180 return 0; |
180 return 0; |
181 } else { |
181 } else { |
182 time_t result = curl_getdate(str, NULL); |
182 time_t result = curl_getdate(str, NULL); |
183 if(result == -1) { |
183 if(result == -1) { |
184 // some shit server don't comply with the WebDAV standard and |
184 // fall back to the ISO-8601 format (e.g. Microsoft Sharepoint |
185 // use ISO-8601 dates for lastmodified (e.g. Microsoft Sharepoint) |
185 // illegally uses this format for lastmodified, but also some |
|
186 // users might want to give an ISO-8601 date) |
186 return util_parse_creationdate(str); |
187 return util_parse_creationdate(str); |
187 } else { |
188 } else { |
188 return result; |
189 return result; |
189 } |
190 } |
190 } |
191 } |