Giter Site home page Giter Site logo

dav4jvm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dav4jvm's Issues

Make POST available for DavResource

POST can also useful for resources that are not collections.

  • Move POST from DavCollection to DavResource
  • Adapt KDoc (not primarily for Add-Member anymore)

Check URI.equals() for URL equality

A server may return a Location header with a differently percentage encoded value, e.g. whether to encode [ and ]. rclone serve webdav is one server that has this behavior. Since we are already creating URI instances from HttpUrl, we can just compare them to check for this kind of equality.

This is from #41 but without the actual one-line code because I might not be abel to sign the CLA.

latest build is missing vital information in pom file

Looking at the pom files from https://jitpack.io/#bitfireAT/dav4jvm I see for the older build aac98bd:

$ cat /home/michael/.gradle/caches/modules-2/files-2.1/com.github.bitfireAT/dav4jvm/aac98bd76cf3034194c9ba6d2bf58212083a72a0/d2579180d429882b73048f6224b82214ff9df3a1/dav4jvm-aac98bd76cf3034194c9ba6d2bf58212083a72a0.pom
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
  <groupId>com.github.bitfireAT</groupId>
  <artifactId>dav4jvm</artifactId>
  <version>aac98bd76cf3034194c9ba6d2bf58212083a72a0</version>
  <name>bitfireAT/dav4jvm</name>
  <description>WebDAV (including CalDAV, CardDAV) library for the Java virtual machine (Java/Kotlin)</description>
  <url>https://github.com/bitfireAT/dav4jvm</url>
  <inceptionYear>2021</inceptionYear>
  <licenses>
    <license>
      <name>Mozilla Public License 2.0</name>
      <url>https://api.github.com/licenses/mpl-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>bitfireAT</id>
      <name>bitfire web engineering</name>
      <email>[email protected]</email>
    </developer>
  </developers>
  <scm>
    <connection>scm:git://github.com/bitfireAT/dav4jvm.git</connection>
    <developerConnection>scm:git://github.com/bitfireAT/dav4jvm.git</developerConnection>
    <url>git://github.com/bitfireAT/dav4jvm.git</url>
  </scm>
  <dependencies>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>4.10.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.ogce</groupId>
      <artifactId>xpp3</artifactId>
      <version>1.1.6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk7</artifactId>
      <version>1.7.20</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.8.1</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>

The newer build 47dd6a9 is missing some vital information, like license, name, description.

$ cat /home/michael/.gradle/caches/modules-2/files-2.1/com.github.bitfireAT/dav4jvm/47dd6a9/fbd606a36fe0220f24c628ee6e2812e449e4943f/dav4jvm-47dd6a9.pom
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
  <groupId>com.github.bitfireAT</groupId>
  <artifactId>dav4jvm</artifactId>
  <version>47dd6a9</version>
  <dependencies>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>4.11.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.ogce</groupId>
      <artifactId>xpp3</artifactId>
      <version>1.1.6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk8</artifactId>
      <version>1.8.21</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.8.1</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>

Check how to deal with invalid values

Especially in context of #8 (comment)


Currently, Property.parse() doesn't allow properties to fail, so something like <multistatus><getetag/></multistatus> can only be handled as an existing, but empty GetETag property (with null values in it).

However, GetETag with null values doesn't make sense.

So the following changes should be done:

  • allow Property.parse() to ignore invalid exceptions (InvalidPropertyException)
  • the GetETag factory throws an InvalidPropertyException when there's no ETag text
  • thus the GetETag constructor can require a String (instead of String?)

WebDAV timestamps are parsed in wrong TZ

WebDAV file timestamps from the server are off by two hours, which is the difference between local time and UTC.

On the server:
> stat -c '%Y' myfile
1683307068

On the Android device
> content query --uri content://at.bitfire.davdroid.webdav/document/15
...last_modified=1683299868000...

Originally posted by @Zimbelstern in #11

Couldn't parse date: Mon, 01 May 2023 08:52:19 GMT, ignoring

Latest DAVx⁵ with current dav4jvm can't parse dates in the preferred format like Mon, 01 May 2023 08:52:19 GMT anymore, causing the WebDAV timestamps to be null.

Happens on Android 13 (also in the emulator). Steps to reproduce:

  1. Set up DAVx5 on Android 13, add WebDAV mount
  2. Open WebDAV directory
  3. All files have timestamp null because the times were not parsed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.