Ticket #2459 (closed defect: wontfix)

Opened 7 months ago

Last modified 4 months ago

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

Reported by: amol Assigned to:
Priority: normal Milestone: 2.1rc1
Component: TurboGears Version: 2.0.3
Severity: blocker Keywords:
Cc:

Description

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

02/03/10 05:13:38 changed by amol

  • milestone changed from 2.0.* bugfix to __unclassified__.

02/23/10 09:14:08 changed by jorge.vargas

  • milestone changed from __unclassified__ to 2.1b2.

I can confirm this is happening.

03/01/10 15:20:47 changed by percious

  • severity changed from normal to blocker.

03/13/10 16:33:16 changed 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?

04/27/10 00:44:20 changed 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.