Semo Semo - 10 months ago 64
PHP Question

Are cookies used to request image sources in android webview?

I am using an android

to load a company page which requires a certain cookie.

Part of this page are several images which are generated via PHP script. This script is on the same site and also requires the same cookie.
I use the CookieSyncManager and CookieManager but I don't know how to prove that the correct cookies are used.

My problem is that the pictures are not shown. When I try to access the pictures separately I get a redirect to the login page ( which is standard for not authenticated requests )

Any ideas?

Answer Source

If you try on Android 4.4, you can use Dev Tools to inspect the network requests and check for the cookie. Prior to 4.4, you could try using tcpdump/wireshark to look at the requests. Alternatively, can you have the server log the cookies that are sent with the request and inspect them that way?