Hi Jesse,

You should add the request to explicitly implement head in the webapp
framework to the issue tracker, or star the request if it already exists.

http://code.google.com/p/googleappengine/issues/list

As for your solution, it's definitely a valid solution.  In general I
usually write a BaseRequestHandler (that inherits from
webapp.RequestHandler). In it I include several different methods for my
handlers, and then have each handler inherit from the base class.

-Marzia

On Sun, Nov 16, 2008 at 7:48 AM, Jesse Grosjean <[EMAIL PROTECTED]>wrote:

>
> The webapp framework is fairly strict about http head requests. I'm
> not a web framework expert, but I think most web frameworks will
> implement head in terms of http GET if an explicit HEAD handler is not
> implemented. But webapp seems to require that head is explicit
> implemented in your handler or else it will return a 405 error. I
> would like HEAD to work on my site, but I don't really want to go and
> add special HEAD handlers to each of my controllers.
>
> This brings up two questions:
>
> 1. Would it make sense to modify the webapp framework so that HEAD
> requests fall back on GET if HEAD isn't implemented?
>
> 2. Related, in my app I've just added this default controller:
>
> class HEADHandler(webapp.RequestHandler):
>        def head(self, *args):
>                return self.get(*args)
>
> And I make all my other controllers inherit from it. This seems to
> work as desired, my controllers now correctly respond to HEAD
> requests. Is this an OK implementation, or can it cause problems that
> I'm not thinking about?
>
> Thanks,
> Jesse
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to