Sounds like you missing the

if __name__ == '__main__':
   main();

thing :)

On 7 November 2010 22:47, David Rocamora
<[email protected]> wrote:
> Hi,
>
> I'm working on a project that consists of a REST service that's
> running in GAE. It's simple and written in Python with the webapp
> framework. I've noticed a problem where the first request to the
> application always returns an empty body with an HTTP status code of
> 200. I'm seeing this problem in both the dev server on my machine and
> when the app is uploaded to GAE.
>
> The app has just one get method and one post method. These are used to
> add and view things in the datastore at the URI that the client is
> accessing. If the data is not in the data store when a client tries to
> GET it, the app should return a 404 and no body. If the data is there
> it should return the data in the body of the response with an HTTP
> status of 200. A POST works similarly; HTTP 200 with some data in the
> body if we can update the datastore and a 500 error if there was a
> problem. This works after the first request to the dev server or an
> instance, but the first request is always returned with an empty body
> and a status code of 200.
>
> This happens with a GET or a POST to a known good URI or even to a
> completely random URI that should be a 404.
>
> I have tried to debug this by using logging to see where the app is
> getting hung up, but strangely enough it doesn't even seem to be
> executing my code on the first request. Is there anything I should be
> looking out for here? How can I troubleshoot this?
>
> Thanks,
> Dave
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
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