Skip to content

Commit 587e8d5

Browse files
committed
Improve XML signature detection (minor change); remove CHANGELOG
1 parent 04645ec commit 587e8d5

File tree

2 files changed

+4
-36
lines changed

2 files changed

+4
-36
lines changed

CHANGELOG.md

+2-34
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,3 @@
11

2-
# Version 2.x
3-
4-
## Version 2.1.3
5-
6-
- keep own repo (built by Gitlab CI)
7-
8-
## Version 2.1.2
9-
10-
- add DAV:owner
11-
- fix date parsing bug
12-
13-
## Version 2.1.1
14-
15-
- add ScheduleTag
16-
- use okhttp 4.7.2
17-
18-
## Version 2.1
19-
20-
- don't rely on ServiceLoader anymore
21-
22-
## Version 2.0
23-
24-
- now uses okhttp 4.5.0, which requires Android 5
25-
- removed deprecated methods
26-
27-
If you need support for older Android versions, stay with 1.x.
28-
29-
30-
# Version 1.x
31-
32-
## Version 1.0.1
33-
34-
- `UrlUtils.equals()`: ignore #fragment URL parts
35-
- updated dependencies
2+
See https://github.com/bitfireAT/dav4jvm/compare/, for instance
3+
https://github.com/bitfireAT/dav4jvm/compare/2.1.2...2.1.3

src/main/kotlin/at/bitfire/dav4jvm/DavResource.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ open class DavResource @JvmOverloads constructor(
533533
Some broken servers return an XML response with some other MIME type. So we try to see
534534
whether the response is maybe XML although the Content-Type is something else. */
535535
try {
536-
val firstBytes = ByteArray(5)
537-
body.source().peek().read(firstBytes)
536+
val firstBytes = ByteArray(XML_SIGNATURE.size)
537+
body.source().peek().readFully(firstBytes)
538538
if (XML_SIGNATURE.contentEquals(firstBytes)) {
539539
Dav4jvm.log.warning("Received 207 Multi-Status that seems to be XML but has MIME type $mimeType")
540540

0 commit comments

Comments
 (0)