Opened 10 years ago

Closed 9 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: master
Severity: Keywords:
Cc: listuser@…, stuhlmueller@… Triage Stage: Accepted
Has patch: no Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:

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 10 years ago.
Patch against django.http.init.py
patch_django_5682_modpython.diff (2.5 KB) - added by listuser@… 10 years ago.
patch_django_5682_wsgi.diff (2.1 KB) - added by David Larlet 10 years ago.
patch_django_5682_client.diff (1.6 KB) - added by David Larlet 10 years ago.
Need documentation on testing.txt
patch_django_5682.diff (9.2 KB) - added by David Larlet 10 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 9 years ago.
This time with mod_python, still need tests. Review welcome.
patch_django_5682.20080131.diff (12.9 KB) - added by David Larlet 9 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 9 years ago.
Patch against r7207, no improvements yet

Download all attachments as: .zip

Change History (16)

comment:1 Changed 10 years ago by David Larlet

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.

Changed 10 years ago by David Larlet

Attachment: patch_django_5682_http.diff added

Patch against django.http.init.py

comment:2 Changed 10 years ago by anonymous

Cc: listuser@… added

Changed 10 years ago by listuser@…

comment:3 Changed 10 years ago by anonymous

Cc: stuhlmueller@… added

Changed 10 years ago by David Larlet

Attachment: patch_django_5682_wsgi.diff added

comment:4 Changed 10 years ago by David Larlet

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.

Changed 10 years ago by David Larlet

Need documentation on testing.txt

Changed 10 years ago by David Larlet

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 Changed 10 years ago by David Larlet

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.

Changed 9 years ago by David Larlet

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

Changed 9 years ago by David Larlet

_get_data was missing for mod_python, now mod_python is tested

comment:6 Changed 9 years ago by Jacob

Triage Stage: UnreviewedAccepted

comment:7 Changed 9 years ago by David Larlet

Needs documentation: set
Needs tests: set

Ok, I'll update tests and documentation.

Changed 9 years ago by David Larlet

Patch against r7207, no improvements yet

comment:8 Changed 9 years ago by David Larlet

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