Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

What to raise to generate an HTTP error response?

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


skip at mojam

Mar 8, 1999, 11:51 AM

Post #1 of 2 (290 views)
Permalink
What to raise to generate an HTTP error response?

I have a Bobo/ZPublisher method that detects a missing file it needs. I
want to return a 404 HTTP response. I know my method is supposed to raise
something, but what? I know it must be in the docs somewhere, but I'll be
damned if I've been able to find it. (I hope there's a Zope site search
tool in the works. How about setting up Ultraseek or something similar in
the meantime?)

Thx,

Skip Montanaro | Mojam: "Uniting the World of Music" http://www.mojam.com/
skip [at] mojam | Musi-Cal: http://www.musi-cal.com/
518-372-5583


michel at digicool

Mar 8, 1999, 3:10 PM

Post #2 of 2 (287 views)
Permalink
RE: What to raise to generate an HTTP error response? [In reply to]

> -----Original Message-----
> From: skip [at] mojam [mailto:skip [at] mojam]
> Sent: Monday, March 08, 1999 1:52 PM
> To: zope-dev [at] zope
> Subject: [Zope-dev] What to raise to generate an HTTP error response?
>
>
>
> I have a Bobo/ZPublisher method that detects a missing file
> it needs. I
> want to return a 404 HTTP response. I know my method is
> supposed to raise
> something, but what? I know it must be in the docs
> somewhere, but I'll be
> damned if I've been able to find it. (I hope there's a Zope
> site search
> tool in the works. How about setting up Ultraseek or
> something similar in
> the meantime?)
>

Skip,

If your using 1.10.2 ZPublisher (previous versions I'm not sure of) Try
returning RESPONSE.notFoundError()
(lib/python/ZPublisher/HTTPResponse.py L437, probably in Response.py in
older versions of ZPublisher)

-Michel

> Thx,
>
> Skip Montanaro | Mojam: "Uniting the World of Music"
> http://www.mojam.com/
> skip [at] mojam | Musi-Cal: http://www.musi-cal.com/
> 518-372-5583
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev [at] zope
> http://www.zope.org/mailman/listinfo/zope-dev
>
> (For non-developer, user-level issues, use the companion list,
> zope [at] zope, http://www.zope.org/mailman/listinfo/zope )
>

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.