[Zope] Excavating for Clues

Spicklemire, Jerry Jerry.Spicklemire@IFLYATA.COM
Wed, 7 Feb 2001 16:03:17 -0500


Hi Zope Fans,

I've been spoending too much time the last couple of days trying to come up 
with a clean way to solve a little problem. Some old posts that I've been 
perusing may be related, but that's not certain. Anyway, here goes.

Jim Penny followed up after:

> Dieter Maurer wrote:
> 
> > Oliver Vecernik writes:
> > 
> >  > I'm designing an application gathering data with forms. Navigation
> >  > should be done with Prev and Next buttons. As long as I'm not leaving
> >  > the form data should be entered, processed and the *same* or another
> >  > form should be displayed, depending on input of the user.
> >  > 
> >  > So far I'm able to gather data, store them in a database, but can
> >  > anybody give me a clue or point me to some docs how to control which
> >  > form should be displayed next? It should depend on users input of
let's
> >  > say a text field.
> > 
> > Look for the "RESPONSE.redirect" method.
> > 
> > Dieter
> 
> Dieter, as usual, gave a good succinct answer.  But in this case, I
> the answer.think that the problem is in the way the question is framed,
and > not the answer. 

<snip a long illuminating post>

> You do not have to redirect.
> Redirection destroys your REQUEST, forcing you to do other things to hold
> information.
> 
> Jim Penny

Great! Well, except that I seem to be having exactly the opposite problem.
When I call "REQUEST.redirect(other_url)", the REQUEST isn't destroyed, in 
fact all the parameters are retained, right down to the original method, so
that a "get" method passes parameters appended to the URL, and a "post" 
method includes all the original REQUEST parameters in the header. 

Not what I need. All I want to do is to pipe the output of a page generation

process back to the requestor (a PDF file, in this case), so that it appears

to be a page being returned in response to a get, submitted with no 
parameters. 

I've also tried "REQUEST.setBase(other_url)" and just "REQUEST(other_url)" 
but the differences are so subtle as to be undeteactable (by me, at least), 
and the parameter passing confuses the browser to the point that it has no 
clue how to handle a garden variety PDF file, and the user has to hit
"refresh" to wake it up.

Actually, so far I'm just trying to do a real redirect to a real PDF file, 
but I feel like I need to get that working before I tackle the file 
generation + pipe part.

Thanks for any help,
Jerry S.