Jason, may be you expected this bug https://bugreports.qt.io/browse/QTBUG-46870 which is Qt 5.5.0 only I'm downgraded to 5.4.2 coz this issue.
2015-08-12 7:19 GMT+03:00 Alexey Godko <[email protected]>: > Jason, may be you expected this bug > https://bugreports.qt.io/browse/QTBUG-46870 > which is Qt 5.5.0 only > I'm downgraded to 5.4.2 coz this issue. > > 2015-08-11 23:10 GMT+03:00 Jason H <[email protected]>: > >> So it looks like there is not a problem at the network level. But for >> whatever reason, Qt does not like the image (attached). >> >> Is there anyone here who can take a look and let me know if it's a >> libjpeg issue, or qt or something else entirely? Chrome loads the image >> just fine, as well as a whole host of other programs (Photoshop, OSX >> Preview, etc). >> >> Thanks! >> >> >> *Sent:* Tuesday, August 11, 2015 at 1:41 PM >> *From:* "Jason H" <[email protected]> >> *To:* "Jason H" <[email protected]> >> *Cc:* "Neil Williams" <[email protected]>, "[email protected]" < >> [email protected]> >> >> *Subject:* Re: [Interest] Using cookies with Image.source >> So now I've got a network access factory going woth a singleton cookie >> jar. It works, kind-of. I am able to access a first image, but subsequent >> requests for images fail with a message: "error decoding {url}: unable to >> read image data" >> >> The server logs a 200 response for both images, and the content-length is >> apropriate. Requesting the same image in chrome results in a valid JPEG. >> >> We are calling jar->setParent(NULL) after nam->setCookieJar(jar), as per >> the documentation. >> >> >> *Sent:* Tuesday, August 11, 2015 at 12:16 PM >> *From:* "Jason H" <[email protected]> >> *To:* "Neil Williams" <[email protected]> >> *Cc:* "[email protected]" <[email protected]> >> *Subject:* Re: [Interest] Using cookies with Image.source >> Ok. Glad to hear we agree... >> >> But how is this not a "bug" I'd figure the XHR and any element with a >> source property should already be using the same factory (that supports >> cookies)? >> >> *Sent:* Tuesday, August 11, 2015 at 11:57 AM >> *From:* "Neil Williams" <[email protected]> >> *To:* "Jason H" <[email protected]> >> *Cc:* "[email protected]" <[email protected]> >> *Subject:* Re: [Interest] Using cookies with Image.source >> You can use QQmlEngine::setNetworkAccessManagerFactory to make the Image >> element use your own QNetworkAccessManager instances, which in turn you can >> set a cookie store on that contains your session cookie. >> >> http://doc.qt.io/qt-5/qqmlengine.html#setNetworkAccessManagerFactory >> >> Note that setNetworkAccessManagerFactory >> set QQmlNetworkAccessManagerFactory is not used by the QML Webview >> component. >> >> On Tue, Aug 11, 2015 at 4:20 PM, Jason H <[email protected]> wrote: >>> >>> 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? >>> _______________________________________________ >>> Interest mailing list >>> [email protected] >>> http://lists.qt-project.org/mailman/listinfo/interest >> >> _______________________________________________ Interest mailing list >> [email protected] >> http://lists.qt-project.org/mailman/listinfo/interest >> >> _______________________________________________ >> Interest mailing list >> [email protected] >> http://lists.qt-project.org/mailman/listinfo/interest >> >> >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
