[TurboGears] #2459: Crash when user agent doesn't specify the HTTP_ACCEPT header accessing a controller method with repoze restrictions

6 views
Skip to first unread message

TurboGears

unread,
Feb 3, 2010, 6:13:23 AM2/3/10
to turbogear...@googlegroups.com
#2459: Crash when user agent doesn't specify the HTTP_ACCEPT header accessing a
controller method with repoze restrictions
------------------------+---------------------------------------------------
Reporter: amol | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 2.0.* bugfix
Component: TurboGears | Version: 2.0.3
Severity: normal | Keywords:
------------------------+---------------------------------------------------
If you try to access a controller method that specifies a @require (like
user being authenticated) without specifying "Accept:" header and without
meeting the requirements you will get "TypeError: You cannot set
Response.body to a unicode object (use Response.unicode_body)"

You can easily reproduce the error by trying to access a
@require(predicates.not_anonymous()) method with "curl -H 'Accept: '
http://localhost:8080/method"

--
Ticket URL: <http://trac.turbogears.org/ticket/2459>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

TurboGears

unread,
Feb 3, 2010, 6:13:39 AM2/3/10
to turbogear...@googlegroups.com
#2459: Crash when user agent doesn't specify the HTTP_ACCEPT header accessing a
controller method with repoze restrictions
------------------------+---------------------------------------------------
Reporter: amol | Owner:
Type: defect | Status: new
Priority: normal | Milestone: __unclassified__
Component: TurboGears | Version: 2.0.3
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by amol):

* milestone: 2.0.* bugfix => __unclassified__

--
Ticket URL: <http://trac.turbogears.org/ticket/2459#comment:1>

TurboGears

unread,
Feb 23, 2010, 10:14:08 AM2/23/10
to turbogear...@googlegroups.com
#2459: Crash when user agent doesn't specify the HTTP_ACCEPT header accessing a
controller method with repoze restrictions
------------------------+---------------------------------------------------
Reporter: amol | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 2.1b2
Component: TurboGears | Version: 2.0.3

Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by jorge.vargas):

* milestone: __unclassified__ => 2.1b2

Comment:

I can confirm this is happening.

--
Ticket URL: <http://trac.turbogears.org/ticket/2459#comment:2>

TurboGears

unread,
Mar 1, 2010, 4:20:47 PM3/1/10
to turbogear...@googlegroups.com
#2459: Crash when user agent doesn't specify the HTTP_ACCEPT header accessing a
controller method with repoze restrictions
------------------------+---------------------------------------------------
Reporter: amol | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 2.1b2
Component: TurboGears | Version: 2.0.3
Severity: blocker | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by percious):

* severity: normal => blocker

--
Ticket URL: <http://trac.turbogears.org/ticket/2459#comment:3>

Reply all
Reply to author
Forward
0 new messages