python - generating non-html output from google's app engine -


i'm trying dynamically generate ical output using max m's icalendar python module , google's app engine. however, when omit boiler plate <html> header , footer tags on output webapp.requesthandler, looks http 200 response added top of file.

when register code:

class calendar(webapp.requesthandler):     def get(self):         self.response.out.write('begin:vcalendar\n')         [...] 

with webapp.wsgiapplication, response looks like:

status: 200 ok content-type: text/html; charset=utf-8 cache-control: no-cache expires: fri, 01 jan 1990 00:00:00 gmt content-length: 11133  begin:vcalendar [...] 

how omit <html> tags and not http 200 response splatted @ top of page?

webapp , app engine don't care content type return, issue unrelated tag (or lack thereof). have print statement somewhere in code, causing headers sent part of body of response. should never use print in wsgi app - use self.response.out.write in snippet pasted.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -