Django-HttpRedirect Error in Internet Explorer

I have a Facebook application using Django. In one of my views, I use the following code snippet to log in a user.

In IE, the HttpResponseRedirect string is returned with the error message "This content cannot be displayed in the frame ...", although other browsers work fine.

Do you have an idea why IE is not working for HttpResponseRedirect? (This problem occurs in IE9 on Windows 7, the server uses django-1.3)

def auto_login(request):
    username = request.GET['username']
    password = request.GET['password']
    user = authenticate(username=username, password=password)
    if user is not None:
            if user.is_active:
        login(request, user)
        theURL='http://apps.facebook.com/myapp/'
        return HttpResponseRedirect(theURL)
            else:
            return HttpResponse("disabled account")
    else:
        return HttpResponse("Invalid login")
+5
source share
1 answer

These can be two things related to the browser security model.

1 - . . , HTTP 307 ( POST) .

2 HTTP- POST url GET.

HTTP- (.. HTTP POST URL-/login urs HTTP GET facebook/myapp), IE8 . , IE9.

, .

  • HTTP. , HTTP , 303 , 307.
  • HTTP POST HTTP GET facebook, : POST yoursite.com → GET yoursite.com → facebook.
  • " " , ( , ). , IE .

:

Django/IE8

http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

+1

All Articles