Unexpected content in HTTP response

Viewed 167

I'm trying to get an image from the link:

http://www.ims.gov.il/Ims/Map/MapRender.aspx?type=weather&LangId=1&Optional=c&Tab=Temperature

Sometimes it works, and at other times instead of getting an image I receive this strange HTML:

<html><body><script>document.cookie='rrrrrrr=27b8c912rrrrrrr_27b8c912; path=/';window.location.href=window.location.href;</script></body></html>

What does it mean and how can I bypass this to get the image?

I've encountered this problem in my Android app which uses URLConnection, and reproduced it in chrome with incognito mode and blocked javascript and cookies.

1 Answers

The response is setting a cookie and then attempting to reload the page. Some things you could try:

  1. Just re-request the image if the first attempt fails.
  2. Try setting the cookie yourself in the URL request.
Related