Opened 17 years ago

Closed 16 years ago

#5682 closed (wontfix)

Support data sent via HTTP PUT in HttpRequest

Reported by: Malcolm Tredinnick Owned by: David Larlet
Component: HTTP handling Version: dev
Severity: Keywords:
Cc: listuser@…, stuhlmueller@… Triage Stage: Accepted
Has patch: no Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

We should add a PUT attribute to the HttpRequest class so that we can use that verb as well (useful for REST scenarios).

Attachments (8)

patch_django_5682_http.diff (2.2 KB ) - added by David Larlet 17 years ago.
Patch against django.http.init.py
patch_django_5682_modpython.diff (2.5 KB ) - added by listuser@… 17 years ago.
patch_django_5682_wsgi.diff (2.1 KB ) - added by David Larlet 17 years ago.
patch_django_5682_client.diff (1.6 KB ) - added by David Larlet 17 years ago.
Need documentation on testing.txt
patch_django_5682.diff (9.2 KB ) - added by David Larlet 17 years ago.
Patch for http request, wsgi and tests' client, without documentation and tests (modpython patch is missing too)
patch_django_5682.20071203.diff (12.7 KB ) - added by David Larlet 16 years ago.
This time with mod_python, still need tests. Review welcome.
patch_django_5682.20080131.diff (12.9 KB ) - added by David Larlet 16 years ago.
_get_data was missing for mod_python, now mod_python is tested
patch_django_5682.20080309.diff (15.5 KB ) - added by David Larlet 16 years ago.
Patch against r7207, no improvements yet

Download all attachments as: .zip

Change History (16)

comment:1 by David Larlet, 17 years ago

Owner: changed from nobody to David Larlet
Status: newassigned

First patch against wsgi, I need to be sure that it's the right way to do before doing the same with modpython (and adding tests?). Discussion on the devel mailing-list: http://groups.google.fr/group/django-developers/browse_thread/thread/a121b2ed850c93ab

It solves the bug if you use django-rest-interface.

by David Larlet, 17 years ago

Attachment: patch_django_5682_http.diff added

Patch against django.http.init.py

comment:2 by anonymous, 17 years ago

Cc: listuser@… added

by listuser@…, 17 years ago

comment:3 by anonymous, 17 years ago

Cc: stuhlmueller@… added

by David Larlet, 17 years ago

Attachment: patch_django_5682_wsgi.diff added

comment:4 by David Larlet, 17 years ago

I previously forgot to add PUT informations in request.REQUEST.

Peter, I hadn't modified your patch because you hadn't uploaded your patches against http.parse_file_upload and http.QuerySet which seemed to be modified too because it returns PUT informations.

I'm working on the client, close to the end.

by David Larlet, 17 years ago

Need documentation on testing.txt

by David Larlet, 17 years ago

Attachment: patch_django_5682.diff added

Patch for http request, wsgi and tests' client, without documentation and tests (modpython patch is missing too)

comment:5 by David Larlet, 17 years ago

I know that there is still a lack of documentation and tests but you can help me:

  • if you use modpython (Peter)
  • if you want to adapt restapi (Andreas)

I had added request.DATA as discussed on the mailing-list thread.

by David Larlet, 16 years ago

This time with mod_python, still need tests. Review welcome.

by David Larlet, 16 years ago

_get_data was missing for mod_python, now mod_python is tested

comment:6 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

comment:7 by David Larlet, 16 years ago

Needs documentation: set
Needs tests: set

Ok, I'll update tests and documentation.

by David Larlet, 16 years ago

Patch against r7207, no improvements yet

comment:8 by David Larlet, 16 years ago

Resolution: wontfix
Status: assignedclosed

Considering the PUT addition, I had discussed with mtredinnick and it appears that it's not useful given the fact you've got request._raw_post_data and nothing states that PUTed data is formencoded (what I hadn't take care before). django-rest-interface project need to be updated to reflect that decision.

A separate bug #5888 had been declared in order to improve the testing client so I close this ticket as wontfix.

Note: See TracTickets for help on using tickets.
Back to Top