Commits

Evgeniy Kirov  committed 2211383

Применяем тот же фикс для Оперы, так как некоторые её версии (например, 10.50) не принимают сторонние куки.

  • Participants
  • Parent commits ae945ab

Comments (0)

Files changed (1)

File vk_iframe/middleware.py

         Solution is to create hidden form to preserve GET variables and REPOST it to current URL.
         taken from https://gist.github.com/796811
         """
-        if request.META['HTTP_USER_AGENT'].find('Safari') != -1\
+        if (request.META['HTTP_USER_AGENT'].find('Safari') != -1
+            or request.META['HTTP_USER_AGENT'].find('Opera') != -1) \
            and 'sessionid' not in request.COOKIES and 'cookie_fix' not in request.GET:
+
             html = """<html><body><form name='cookie_fix' method='GET' action='.'>"""
             for item in request.GET:
                 html += "<input type='hidden' value='%s' name='%s' />" % (request.GET[item], item)