Commit 285b464f authored by Luke Plant's avatar Luke Plant
Browse files

[1.2.X] Updated AJAX example code in CSRF docs to be consistent regarding what...

[1.2.X] Updated AJAX example code in CSRF docs to be consistent regarding what are safe HTTP methods

Backport of [16202] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@16204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent cfc1756e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ that allow headers to be set on every request. In jQuery, you can use the
                !(/^(\/\/|http:|https:).*/.test(url));
        }
        function safeMethod(method) {
            return (method === 'GET' || method === 'HEAD');
            return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
        }

        if (!safeMethod(settings.type) && sameOrigin(settings.url)) {