This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: misc athttpd fixes
On Wed, Nov 14, 2007 at 02:36:42PM +0000, Jonathan Larmour wrote:
> ?yvind Harboe wrote:
> > Oopps... take #2. Sent out the wrong patch file, should be this one.
>
> Thanks, chunk 3 of the http.c changes did not apply, but since these
> are apparently only white space changes anyway, that's no problem.
>
> Unfortunately the Docbook was indeed incorrect. I've fixed and changed
> it.
>
> Are you sure about that example? Maybe Jim's implementation of Tcl is
> different from normal Tcl, but it doesn't look right to me. Fair
> enough if you have tried it. I think the example could probably be
> simpler (and not require needing space in memory for twice the whole
> file), but I'm not in a position to check anything myself, so I'll
> have to leave that for you or others to improve if it can be.
>
> Jifl
Hello Oyvind,
Thanks for your efforts to improve ATHTTPD stuff. Excuse me, but my
heart was broken when I saw your hello world example in latest eCos
documentation. I have the Jonathan's concern too.
1) Why did you name the section "tcl hello world example"? I see that
in so many words in Tcl you did desire to demonstrate Jim's I/O ability,
didn't you?
2) Why did you use the semicolons everywhere? (Tcl != C)
3) Folk know what Jim says "hello" as Tcl does it
puts "hello, world!"
So, in CGI example the Jim's greeting would look something like this
3-lines code
--------------------------------------->8
begin text
say "hello, world!"
end
--------------------------------------->8
or
--------------------------------------->8
begin html
out "<html><body><h1>hello, world!</h1></body></html>
end
--------------------------------------->8
As Tcl does, Jim supports `rename' command, so you can put same lines
before greeting:
rename write_chunked say ;# or echo, out, print, write, ... etc.
rename start_chunked begin
rename end_chunked end
I did play with ATHTTPD+Jim a while ago and I cannot test this just
now. Can you test the same code? Would you like to clean up or rename
that doc section?
3) IMO that your mapper in Jim will work too slow
set data [string map {\n <br>} $data];
and log will be dumped with proportional font face and it will look ugly
in a browser. What do you think about same line there (formatting is the
browser's care)
out "<pre>[$fp read]</pre>"
Well, excuse me the Tcl advocacy here, but Jim is almost Tcl and even more
http://wiki.tcl.tk/13693
Thank you. Best regards,
Sergei