Ticket #2459 (closed defect: wontfix)
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: | |
| 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
comment:2 Changed 2 years ago by jorge.vargas
- Milestone changed from __unclassified__ to 2.1b2
I can confirm this is happening.
comment:4 Changed 2 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 22 months 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.