Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

IIS Server not returning expected format for multipart Content-Type #7

Open
lauzond opened this issue Dec 6, 2019 · 0 comments
Open

Comments

@lauzond
Copy link

lauzond commented Dec 6, 2019

/zsync-core/src/main/java/com/salesforce/zsync/internal/util/HttpClient.java#L425
MediaType.parse() doesn't expect the format of the Content-Type header to be as provided by an older IIS Server version and results in error "Could not parse 'multipart/byteranges"

To workaround this issue:

Remove final from:
/zsync-core/src/main/java/com/salesforce/zsync/internal/util/HttpClient.java#L421

And insert the follwing code line before:
/zsync-core/src/main/java/com/salesforce/zsync/internal/util/HttpClient.java#L425

contentType = contentType.replaceFirst("multipart/byteranges; boundary=(<[^>]*?>)", "multipart/byteranges; boundary=\"$1\"");
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant