[Zope3-Users] BrowserResponse, write()
Andreas Reuleaux
reuleaux at web.de
Fri Sep 16 13:26:39 EDT 2005
I just got this answer from Jim by private e-mail
- which is my fault, as I had e-mailed him privately
before:
On Fri, Sep 16, 2005 at 12:53:42PM -0400, Jim Fulton wrote:
> ...
> Was there a reason to use response.write rather than
> returning the pdf as a string?
>
> Jim
> ...
First of all: Yes, this seems to be the solution as Stephan has also
pointed out:
def __call__(self):
pdf = ...
response=self.request.response
response.setHeader(...)
return pdf.data
Thanks for that.
To answer Jims question: I am not sure, I guess the onliest
reason to use response.write(pdf.data) was that just returning
pdf.data didn't work properly before(?), concluding from
Stephans answer:
On Fri, Sep 16, 2005 at 11:50:19AM -0400, Stephan Richter wrote:
> Just return the data; it is handled properly now.
Maybe Philipp has a better answer.
-Andreas
More information about the Zope3-users
mailing list