so now.. is there any example of how you can handl...
# ktor
n
so now.. is there any example of how you can handle url redirects on ktor-client manually? i am dealing with a api returning me incorrectly escaped urls, and with fuel i just disabled redirects and looped until it finally resulted in a file
have you reported the issue you have with escaping, so we can fix it?
n
i can do so.. my fix is https://gist.github.com/NikkyAI/d2820695a112a2b3a681b6333c2189e6 now i am stuck on some jar from jenkins not working due to content-type, seems like the header is lowercase ?
i have to go soon, i hope i will remember to do a proper report on github
d
okay, thanks!
n
now how to handle files like this: https://media.forgecdn.net/files/2522/248/Controlling-3.0.6.jar it has a empty header value for content-encoding i hate people who do this to me
d
Copy code
< HTTP/1.1 200 OK
< Content-Type: application/octet-stream
< Content-Length: 26034
< Connection: keep-alive
< Date: Tue, 23 Jan 2018 01:34:55 GMT
< Last-Modified: Sat, 20 Jan 2018 18:12:27 GMT
< ETag: "0d9a0429c72bc1c06358f1166bdd8c59"
< Content-Encoding:
< Accept-Ranges: bytes
< Server: AmazonS3
< Age: 2954
< X-Cache: Hit from cloudfront
< Via: 1.1 ...(CloudFront)
< X-Amz-Cf-Id: ...
Yep, loops like that. What do you mean by how to handle?
Do you have an exception or something when downloading?
n
well curl and chrome can download it just fine.. so how can i instruct HttpClient to ignore those "excpected" errors ?
d
let me check if I can find a workaround
n
cool, i will be back later.. i am running late
d
okay
@e5l it seems that
if (range.start == range.end) throw ParserException("No HTTP header value provided for name ${builder.substring(nameStart, nameEnd)}: \n$builder")
(or at least should be a way to disable that verification) since the request is still valid, chrome, curl and wget can download it
👌 1
👀 2