[prev in list] [next in list] [prev in thread] [next in thread]
List: zope3-users
Subject: [Zope3-Users] BrowserResponse, write()
From: reuleaux () web ! de (Andreas Reuleaux)
Date: 2005-09-16 13:38:34
Message-ID: 20050916172639.GA3740 () g4
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic