1

I'm using Glide to load images in my app and I encountered some problem with loading images from a url that contains a ;. The image path is something like

https://adbutler-fermion.com/getad.img/;libID=502532

It throws a Glide exception failed to load resource. All other images are loading fine except for one with the special character ; within the Url. My stack trace is as below

com.bumptech.glide.load.HttpException: Bad Gateway
    at com.bumptech.glide.load.data.HttpUrlFetcher.loadDataWithRedirects(HttpUrlFetcher.java:118)
    at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:53)
    at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:61)
    at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:275)
    at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:245)
    at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:220)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at java.lang.Thread.run(Thread.java:764)
    at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:347)

I tried with

Glide.with(context).load(imageUri).into(postImage);

using both string url and a uri. How can I fix this.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Samantha Withanage
  • 3,811
  • 10
  • 30
  • 59

0 Answers0