Re: WSGI wrapper for Pyblosxom

Bill Mill <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
On Wed, 8 Dec 2004 21:14:52 -0600 (CST), will guaraldi
<[email protected]> wrote:
> On Wed, 8 Dec 2004, Bill Mill wrote:
> 
> > On Wed, 8 Dec 2004 16:56:22 -0600 (CST), will guaraldi
> >>>
> >>> I assume that you mean that you'll remove the addHttp( {'form'...})
> >>> from the blosxom_handler and move it to pyblosxom.cgi?
> >
> > You're right, I wasn't making sense. I have a tedency to do that.
> > Nevermind what I said, strike it from the record.
> 
> You know...  I think I explicitly moved the addHttp to pyblosxom.py, but I
> forget why exactly.  I want to say it had something to do with allowing
> other scripts a common initialization, but I don't recall.
> 
> Is it bad that it's there?  I'm not sure there's any good reason not to
> move it elsewhere.
> 

The problem was that my photo gallery called cgi.FieldStorage() in
cb_start. I did not know that any subsequent calls to the
FieldStorage() call would then return an empty dictionary as the cgi
form.

Normally, this didn't cause any problems, as pyblosxom doesn't often
make use of form variables. However, I was setting up to test the
comments with my cache plugin (and later for writing the preview
code), and I *just couldn't get it to work*. The FieldStorage() call
in blosxom_handler was the second call to that function, but I didn't
remember that my photo plugin called it. Thus, I was receiving no post
data, and couldn't figure out why.

I went so far as to run ethereal and make sure that my browser was
sending the post data to the script - which it was, naturally. I was
*just* about to send an email to the list asking if anyone had similar
troubles when the light went on over my head.

In summary, to make my script work, I'll either have to figure out a
way to get the data without removing it, or I'll have to try and
convince you to move the call earlier in the chain.

Peace
Bill Mill
bill.mill at gmail.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.