[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mod-guile-devel] Updates /Questions
From: |
rm |
Subject: |
[Mod-guile-devel] Updates /Questions |
Date: |
Mon, 12 Aug 2002 15:21:03 +0200 |
User-agent: |
Mutt/1.3.24i |
Ok, i'm allmost done with factoring out the code
into several files/modules. So far i have
(apache server)
(apache connection)
(apache request)
(apache tables)
(mod-guile utils)
I also moved all sources to a subdirectory, docs and
autoconf/automake support scripts have a directory as
well.
I've pretty much autotoolized the whole thing, but
unfortunately i've not yet found a good solution that
allows me to use automake to build a .so target.
On the way i stumbled accross several things:
- I needed to write a new snarfer macro 'SCM_DEFINE_PUBLIC'
that adds the defined method to a modules public interface.
- 'read-form-data' should probably _not_ use the request records
character string representation of content length. A more
secure approach would be to read 'long req->remaining' _after_
a call to ap_setup_client_block(). Aditionally, the method
should check the req->method_number: reading from a GET
request is probably a bad idea ;-)
- parse-form-data: i'm not shure about the best semantic for
this function. Currently the code returns #f if it can't parse
the string parameter (for example if the string is empty).
This probaly makes the code using this function rather elaborate.
Instead of:
(for-each process-param (parse-form-data data))
one has to explicitly test:
(let ((dict (parse-form-data data)))
(if (dict)
(for-each process-param dict)
#f))
I'd suggest returning an empty list instead ...
- In some places apache structures hold integers and your
code dutifully returns these
(req-rec:header-only req)
Since these integers are nothing more than C's way of expressing
booleans i'd suggest returning #t / #f instead.
A more 'cosmetic' sugestion: since request record etc. getters/setters
are now in their own module, maybe we can remove the name prefix.
(request-rec:header-in r) -> (headers-in r)
we can still get the 'old' names by importing with a renamer
(use-modules (apache request) :renamer (symbol-prefix-proc 'request-rec:))
As soon as i find a solution for my automake problem i'll post the
new code.
Ralf
PS: on the "good news" side: the thing is getting impressively fast ;-)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Mod-guile-devel] Updates /Questions,
rm <=