Code

Opened 7 years ago

Closed 6 years ago

#5682 closed (wontfix)

Support data sent via HTTP PUT in HttpRequest

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

Download all attachments as: .zip

Change History (16)

comment:1 Changed 7 years ago by david

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to david
  • Patch needs improvement unset
  • Status changed from new to assigned

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 7 years ago by david

Patch against django.http.init.py

comment:2 Changed 7 years ago by anonymous

  • Cc listuser@… added

Changed 7 years ago by listuser@…

comment:3 Changed 7 years ago by anonymous

  • Cc stuhlmueller@… added

Changed 7 years ago by david

comment:4 Changed 7 years ago by david

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 7 years ago by david

Need documentation on testing.txt

Changed 7 years ago by david

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

comment:5 Changed 7 years ago by david

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 7 years ago by david

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

Changed 6 years ago by david

_get_data was missing for mod_python, now mod_python is tested

comment:6 Changed 6 years ago by jacob

  • Triage Stage changed from Unreviewed to Accepted

comment:7 Changed 6 years ago by david

  • Needs documentation set
  • Needs tests set

Ok, I'll update tests and documentation.

Changed 6 years ago by david

Patch against r7207, no improvements yet

comment:8 Changed 6 years ago by david

  • Resolution set to wontfix
  • Status changed from assigned to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.