Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2005 (closed enhancement: fixed)

Opened 11 years ago

Last modified 11 years ago

[PATCH] Need support for "204 No Response" statuses

Reported by: PeterRussell Owned by: Chris Arndt
Priority: normal Milestone: 1.1
Component: TurboGears Version: 1.1 HEAD
Severity: normal Keywords:
Cc:

Description

In a REST API you're likely to want to return a 204 status, indicating that there's no response body. Attached is a patch to support this in TurboGears 1.1

Attachments

204.patch Download (2.1 KB) - added by PeterRussell 11 years ago.

Change History

Changed 11 years ago by PeterRussell

comment:1 Changed 11 years ago by faide

#1996 depends on this one.

comment:2 Changed 11 years ago by Chris Arndt

  • Status changed from new to assigned
  • Owner changed from faide to Chris Arndt

This looks good. I'm testing it now and will write a small unit test.

Next time, please always create diffs from the root directory of the branch or trunk (i.e. /branches/1.1, /branches/1.5, etc. or /trunk). See the  patching guidelines for more information.

comment:3 Changed 11 years ago by Chris Arndt

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

Applied in r5514 with test. Thanks!

comment:4 Changed 11 years ago by PeterRussell

Sorry, I usually do create diffs correctly, I think that happened because I had several changes, and was cherrypy picking that one.

For what it's worth (not much), the assertions in the unit test are redundant, the wsgi validator already makes those checks (that's why I knew the patch was necessary in the first place). Still, explicit is better than implicit.

Thanks for applying the patch.

Note: See TracTickets for help on using tickets.