> Sent: Tuesday, August 11, 2015 at 11:20 AM > From: "Jason H" <[email protected]> > To: "[email protected]" <[email protected]> > Subject: [Interest] Using cookies with Image.source > > I have an application that needs a user to login and maintain a cookie. The > AJAX features work just fine. But when I set the Image.source property to a > URL that is protected and requires a session cookie, it gets a 401. > > How can I tell Image elements to use a cookie, the same cookie the AJAX login > result got? > _______________________________________________
So I'm digging into this some more, and I think I have a handle on the problem. It seems the XmlHttpRequest() object uses a cookie-enabled QNetworkAccessManger, probably created with QQMLNetworkAccessManagerFactory. It also seems that Image elements don't use the same one, because we login, get the cookie, the AJAX works, but the image elements don't (The server is not receiving a cookie from the Image) . So they must be using another QNetworkAccessManger, not created with QQMLNetworkAccessManagerFactory? Isn't this a bug? Shouldn't the Image elements and the AJAX all be using the same factory? _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
