Hi, were having the exact same problem.

We're integrating with a third-party API that sends "pings" via simple
POST requests to our server to give us updates re: status video
conversion processes.

We're running Django 1.2.1 with Apache mod_python on Ubuntu 9.04.

I've disabled ALL csrf related middleware for debugging purposes in
settings.py, although we'll want that enabled on production.

I've been attempting to debug with wget. When I hit the listener URL,
it works fine if no post data is sent. However, as soon as I add the --
post-data tag with ANY text, a 403 is always returned.

Even tried @csrf_exempt and @csrf_response_exempt AND adding
csrf_exempt = True to the response object.

This is quite frustrating as we're following all the docs for
disabling CSRF and this is getting in the way of what would be a very
simple task.

Further, debugging 403s is nearly impossible. It'd be very helpful
when in DEBUG mode to reveal who/what/why raised the 403.

Any ideas?

Kieran



On Jul 26, 8:30 am, etone <misplacedcanad...@gmail.com> wrote:
> Hi there,
>
> I'm trying to sent a HTTP POST from a client application to my Django
> app.  Django does indeed receive the HTTP POST as I do hit
> _HandleRequest(),  however it returns a 403 Forbidden, instead of
> hitting my handler function.  I experimented and sent a HTTP GET from
> my client application and in this case I am able to hit my handler
> function.  I would like to use HTTP POST as I want to upload some data
> to my Django app.
>
> What am I doing wrong/missing?
>
> Here is my settings.py in my django app:
>
>  try:
>     from djangoappengine.settings_base import *
>     has_djangoappengine = True
> except ImportError:
>     has_djangoappengine = False
>     DEBUG = True
>     TEMPLATE_DEBUG = DEBUG
>
> import os
>
> INSTALLED_APPS = (
>     'djangotoolbox',
> #    'django.contrib.auth',
>     'django.contrib.contenttypes',
>     'django.contrib.sessions',
> )
>
> if has_djangoappengine:
>     INSTALLED_APPS = ('djangoappengine',) + INSTALLED_APPS
>
> ADMIN_MEDIA_PREFIX = '/media/admin/'
> MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
> TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__),
> 'templates'),)
>
> ROOT_URLCONF = 'urls'

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to