pull/34/head
kunfei 5 years ago
parent 9469e52503
commit dfd21b5c5c
  1. 2
      app/src/main/java/io/legado/app/lib/webdav/WebDav.kt
  2. 11
      app/src/main/java/io/legado/app/lib/webdav/http/Handler.kt

@ -21,7 +21,7 @@ import java.util.*
class WebDav @Throws(MalformedURLException::class)
constructor(url: String) {
private val url: URL = URL(null, url, Handler.HANDLER)
private val url: URL = URL(null, url, Handler)
private var httpUrl: String? = null
var displayName: String? = null

@ -4,7 +4,7 @@ import java.net.URL
import java.net.URLConnection
import java.net.URLStreamHandler
class Handler : URLStreamHandler() {
object Handler : URLStreamHandler() {
override fun getDefaultPort(): Int {
return 80
@ -13,13 +13,4 @@ class Handler : URLStreamHandler() {
public override fun openConnection(u: URL): URLConnection? {
return null
}
override fun parseURL(url: URL, spec: String, start: Int, end: Int) {
super.parseURL(url, spec, start, end)
}
companion object {
val HANDLER: URLStreamHandler = Handler()
}
}

Loading…
Cancel
Save