Feature #1519

WPainter::Image and https

Added by Miguel Revilla about 10 years ago. Updated about 10 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


WPainter::Image supports http URIs as source for the image, but won't work with https. It would be nice to have this feature.


Updated by Koen Deforche about 10 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche


Are you trying to incorporate a HTTPS image in a HTTP-based web application ?

What is the exact behavior that you observed, and in what browser (what WPainter backend) did you see the problem ?




Updated by Miguel Revilla about 10 years ago

I have an application backend based in Wt, where I mostly use WResource for serving the REST/json interface. I've found it quite nice for my needs, hence, even that backend is not serving any widgets, I don't see a reason to use a different toolkit. That backend communicates with the web frontend (also based in Wt) via https. Now, there are images (user avatars) that are stored at the backend. Previously I used base64 encoding to serve the avatars as a json field, and then insert them into the WPainter via WPainter::Image where the url was the actual base64 string. I looks like this method is not supported anymore (or, at least, it stopped working). I then switched to directly serve the binary image (via WResource on the backend, also more economic in bandwidth terms). That won't work if I use HTTPS between the frontend and the backend, and works out of the box if I switch back to plain HTTP.

Of course I could do this in two steps, first serving the binary image to a frontend local cache file, and then putting it into the WPainter, but I would like to do it directly as the frontend might be a VERY small stateless appliance with (almost) no local storage and, also, there's no guarantee that different requests are handled by the same frontend instance (because of a load balancer), thus forcing me to cache all the avatars into every frontend.

I'm not sure if this makes sense or if I am using a wrong approach, but with WPainter::Image having support for HTTP requests makes me think that adding HTTPS shouldn't be too much of a problem.


Also available in: Atom PDF