From scaekenberghe at common-lisp.net Tue Mar 7 16:32:34 2006 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Tue, 7 Mar 2006 17:32:34 +0100 Subject: [kpax-devel] Recent Changes Message-ID: <3A61706D-9D0D-4644-91F6-586927AB4FF3@common-lisp.net> Today I committed/released the following changes: Normally, KPAX buffers both its request and response streams, that is, get-request-body was always preloaded and cached as a string, and output was always written first to get-content-stream, a buffered string-output-stream that was only really written out when the handling of the request-response was over (when commit was called) - this makes it easy to generate correct content-lengths for dynamic output (and thus to maintain HTTP keepalive). This situation remains the default and is the best choice for normal dynamic content. However, when uploading large amounts of data or when serving large binary data, this buffering scheme is often not optimal (slower and less space efficient). Therefor, the following additions where made: get-request-body and get-content-stream are now lazy so buffering only starts when you are really using it request and response states are carefully managed using slots in the request-response object get-request-state goes from through the following states (in order): NIL :request-line-read :headers-read :body-read get-response-state goes through the following states (in order): NIL :response-line-written :headers-written :response-written :response-flushed All this is invisible to the normal user. If you did not yet start using the buffered variants, you can now access the raw unbuffered streams with get-request-stream and get-response-stream calling get-response-stream will automatically call commit-headers, but you should really do this manually so that you can pass along the content-length, which only you can know up front. a new example, upload3, uses both of these new features. the function extract-multipart-parts in multipart-form-encoding.lisp was also extended, the new signature is now (stream-or-body-string &key use-tmp-files-for-data) meaning that it can parse both a stream as well as a string, and that it can store file type parts directly in real temporary files and just return the pathname instead of the whole content as a string. please note that these new features do not work for paserve yet. Serving favicon.ico files was added to s-http-server (just set s-http- server:*favicon* to a pathname) Please let me know if these changes break anything, Sven -- Sven Van Caekenberghe - http://homepage.mac.com/svc Beta Nine - software engineering - http://www.beta9.be "Lisp isn't a language, it's a building material." - Alan Kay From lam at tuxfamily.org Sat Mar 18 10:50:26 2006 From: lam at tuxfamily.org (Nicolas Lamirault) Date: Sat, 18 Mar 2006 11:50:26 +0100 Subject: [kpax-devel] problem installation Message-ID: <8764mcaux9.fsf@no-log.org> hi, i have a problem during installation of kpax $> sbcl This is SBCL 0.9.9, an implementation of ANSI Common Lisp. More information about SBCL is available at . SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. * (asdf:oos 'asdf:load-op :kpax) ; loading system definition from /home/nicolas/.sbcl/systems/kpax.asd into ; # ; registering # as KPAX ; loading system definition from ; /home/nicolas/.sbcl/systems/kpax-s-http-server.asd into # ; registering # as KPAX-S-HTTP-SERVER ; loading system definition from /home/nicolas/.sbcl/systems/s-http-server.asd ; into # ; registering # as S-HTTP-SERVER ; loading system definition from /usr/share/common-lisp/systems/puri.asd into ; # ; registering # as PURI ; registering # as PURI-TESTS ; loading system definition from /home/nicolas/.sbcl/systems/s-base64.asd into ; # ; registering # as S-BASE64 ; loading system definition from /home/nicolas/.sbcl/systems/s-sysdeps.asd into ; # ; registering # as S-SYSDEPS ; loading system definition from /home/nicolas/.sbcl/systems/s-utils.asd into ; # ; registering # as S-UTILS ; loading system definition from /home/nicolas/.sbcl/systems/kpax-core.asd into ; # ; registering # as KPAX-CORE ; loading system definition from /home/nicolas/.sbcl/systems/cl-who.asd into ; # ; registering # as CL-WHO ; loading system definition from /home/nicolas/.sbcl/systems/kpax-mod-lisp.asd ; into # ; registering # as KPAX-MOD-LISP STYLE-WARNING: implicitly creating new generic function POSITION-CHAR STYLE-WARNING: implicitly creating new generic function URI-P STYLE-WARNING: implicitly creating new generic function URI-PARSED-PATH STYLE-WARNING: implicitly creating new generic function (SETF URI-PARSED-PATH) STYLE-WARNING: implicitly creating new generic function URI STYLE-WARNING: implicitly creating new generic function MERGE-URIS STYLE-WARNING: implicitly creating new generic function ENOUGH-URI STYLE-WARNING: implicitly creating new generic function INTERN-URI STYLE-WARNING: implicitly creating new generic function APPENDM STYLE-WARNING: implicitly creating new generic function FLUSH-LOG STYLE-WARNING: implicitly creating new generic function (SETF GET-LOCALIZED-STRING) STYLE-WARNING: implicitly creating new generic function RESET STYLE-WARNING: implicitly creating new generic function LOAD-LOCALIZED-STRINGS STYLE-WARNING: implicitly creating new generic function DUMP-ALIST STYLE-WARNING: implicitly creating new generic function DUMP-MULTI-ALIST STYLE-WARNING: implicitly creating new generic function LOAD-MULTI-LOCALIZED-STRINGS STYLE-WARNING: defining *MT-K2^32* as a constant, even though the name follows the usual naming convention (names like *FOO*) for special variables STYLE-WARNING: defining *MT-K-INVERSE-2^32F* as a constant, even though the name follows the usual naming convention (names like *FOO*) for special variables STYLE-WARNING: defining *MT-N* as a constant, even though the name follows the usual naming convention (names like *FOO*) for special variables STYLE-WARNING: defining *MT-M* as a constant, even though the name follows the usual naming convention (names like *FOO*) for special variables STYLE-WARNING: defining *MT-UPPER-MASK* as a constant, even though the name follows the usual naming convention (names like *FOO*) for special variables STYLE-WARNING: defining *MT-LOWER-MASK* as a constant, even though the name follows the usual naming convention (names like *FOO*) for special variables and nothing after theses lines ... someone knows how could i fix the problem ? thanks -- Nicolas Lamirault -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 190 bytes Desc: not available URL: From kevin at cavewallarts.com Wed Mar 29 10:19:57 2006 From: kevin at cavewallarts.com (Kevin Griffin) Date: Wed, 29 Mar 2006 02:19:57 -0800 Subject: [kpax-devel] Re:problem installation Message-ID: <442A5F4D.5010403@cavewallarts.com> Nicholas- You might want to try and remove your old fasls and then do a (asdf:oos 'asdf:compile-op 'kpax) I have a hunch you have some stale fasls kicking around. -- \ Kevin Griffin System Administrator \ - (o)"My first name" at cavewallarts.com Cave Wall Arts (o) From emailmac at gmail.com Tue Mar 28 04:18:07 2006 From: emailmac at gmail.com (Mac Chan) Date: Tue, 28 Mar 2006 04:18:07 -0000 Subject: [kpax-devel] Nifty examples Message-ID: <4877ae640603271835s3074ee75td8d9af0dd4267333@mail.gmail.com> Hi, I'm designing a very simple mvc framework so I'm trying to see if I can steal some ideas from kpax :-) Here're some small patches that I made in order to load kpax under win32/lispworks. The static file handler is not quite working in win32 though. I haven't dug into it yet. ;; S-HTTP-SERVER: Failed to find #P"/apps/cl/kpax/example/static/kpax-movie-poster.jpg" Anyway, I'm impressed with the number of examples provided in kpax. Keep up the good work! Thanks, -- Mac -------------- next part -------------- A non-text attachment was scrubbed... Name: sven.diff Type: application/octet-stream Size: 4819 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: wiki.lisp Type: application/octet-stream Size: 22893 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: crypto.lisp Type: application/octet-stream Size: 3279 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: http-server.lisp Type: application/octet-stream Size: 27131 bytes Desc: not available URL: