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 #2459 (closed defect: wontfix)

Opened 9 years ago

Last modified 9 years ago

Crash when user agent doesn't specify the HTTP_ACCEPT header accessing a controller method with repoze restrictions

Reported by: amol Owned by:
Priority: normal Milestone: 2.1rc1
Component: TurboGears Version: 2.0.3
Severity: blocker 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"

Change History

comment:1 Changed 9 years ago by amol

  • Milestone changed from 2.0.* bugfix to __unclassified__

comment:2 Changed 9 years ago by jorge.vargas

  • Milestone changed from __unclassified__ to 2.1b2

I can confirm this is happening.

comment:3 Changed 9 years ago by percious

  • Severity changed from normal to blocker

comment:4 Changed 9 years ago by avassalotti

I was not able to reproduce the bug with latest development version of TurboGears running on Python 2.6.2. Could you provide a test case?

comment:5 Changed 9 years ago by percious

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

I'm closing this one. I have tried it myself and it works fine. I've had multiple people also try to track it down. If someone can provide a testcase I will gladly accept a re-opened ticket before rc1.

Note: See TracTickets for help on using tickets.