Long answer (scroll down for shorter answer)

Depends on what version you are using...

If its a newer version (1.4.x or 1.5.x), did you take GZIP compression option 
off in
the configuration file? (depending on which version of PSP you use, it will be 
called
pwu.conf or psp.conf or psp.ini) Gzip compression requires all input is buffered
before displaying output, and going through WebWriteln automates that for you.

In order for PSP 1.4.x and 1.5.x to work fully to its potential it is always
recommended to use WebWriteLn rather than direct WriteLn calls. PSP deals with
sessions (and other things) automatically and needs to know the first time you 
call
WriteLn. That is trapped for you, when you call webwriteln (but not if you call
WriteLn). When you use webwriteln, PSP gets sent a nice notice that you are 
starting
the program, if this is the first WriteLn call.

Older versions of PSP allowed you to use direct WriteLn calls, but they had no 
GZIP
option, and they required a lot more keyboarding than the new automated less
keyboarding style.

p.s. Also, Trustmaster one of the developers of PSP has already written a small
server of his own in Pascal... I think he put it up on source forge. He used 
that
with PSP a while back for some experiments.


> i don't know if i will get beat down for asking this question here ...
> but i'll try.
>
> i found a pascal web server :
>
> http://www.ritlabs.com/en/products/tinyweb/
>
> it supports CGI suppossedly.
>
> if i try to get it to use a PSP CGI, the web server renders a response
> that says the CGI didn't return anything.
>
>in looking at the source, and the CGI examples that come with the
> tinyweb server, their example just does "WriteLn" stuff, writing to
> standard out.
>
> does anyone know, quick and dirty, if the PSP framework is writing to
> 'stdout' ultimately ?

If you are using GZIP compression in the configuration call, no. If gzip 
compression
is OFF, then yes, it is writing to STDOUT immediately (WriteLn call)

>sorry for asking here, i just didn't want to have to join another
>handful of lists to get information, if i didn't have to, and i was
>pretty sure there might be some PSP lurkers on this list.

I know the feeling, I think I will combine a bunch of my projects into one list 
where
people can join. It just doesn't make sense to have 6 lists for 6 small-medium
projects. Better have one instead. Thanks for reminding me of that todo.


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to