Thanks yejun, got it working.

On Dec 1, 3:45 pm, yejun <[EMAIL PROTECTED]> wrote:
> GAE program run on a CGI server if you decide to by pass WSGI gateway.
> So you should use CGI header instead of raw HTTP headers.
>
> On Dec 1, 3:48 pm, Brian <[EMAIL PROTECTED]> wrote:
>
> > I've decided not to use WSGI for my application, and instead I'm
> > crafting my HTTP responses by hand, much like the "Hello World"
> > example in the GAE documentation:
>
> > print 'Content-Type: text/plain'
> > print ''
> > print 'Hello, world!'
>
> > It seems that when this method is used, the output is buffered and
> > then altered by the server (I assume both development and production),
> > injecting additional headers -- server, content-length, cache-control,
> > etc.  This is all well and good, for the most part, as it doesn't seem
> > to overwrite any headers I've crafted.
>
> > Now on to my problem:
> > The server also injects a status line into my crafted response.  Any
> > requested URL that matches a URL pattern in app.yaml will result in a
> > 200 OK status.  So, taking the Hello World example above, I would like
> > to do the following:
>
> > print 'HTTP/1.1 404 Not Found'
> > print 'Content-Type: text/plain'
> > print ''
> > print 'Hello world wasn't found!'
>
> > When I do this, the server doesn't recognize the HTTP status code,
> > injects its own status code and headers, then sends by my original
> > status code and headers as response content.
>
> > I assume this would be considered a bug, unless I'm doing something
> > wrong.  Any help would be appreciated, otherwise I will file a bug
> > report.
>
> > Thanks
>
> > Brian
--~--~---------~--~----~------------~-------~--~----~
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