On Tue, 29 Nov 2005 00:18:08 +0200, Ignas Mikalajunas <ignas.mikalajunas(a)gmail.com> wrote:
> Content length is calculated by calling (length content) which
> produces wrong results with unicode characters in the string. Piso
> on #lisp proposed a solution - using (length (string-to-octets
> string :external-format :utf-8)) which translates to just (length
> (string-to-octets string :external-format)) in the code.
I won't do that because it's most likely a terrible performance hog if
you convert each page to octets be default (assuming that most users
already send octets).
I also don't understand why
(length (string-to-octets string :external-format :utf-8))
translates to
(length (string-to-octets string :external-format))
> The true way to solve this would be using (file-string-length),
> but the function is not working properly on sbcl yet.
Huh? How is that supposed to work (even if it would work on SBCL)?
*TBNL-STREAM* is a binary stream which accepts octets, isn't it?
> So could you please fix the (send-output),
IMHO there's nothing to "fix" because TBNL works as expected. The
docs clearly say that you're supposed to send octets, see for example
here:
<http://weitz.de/tbnl/#quirks>
Note that the UTF-8 example that comes with TBNL sends a correct
header.
FWIW, I've just released a new version where you can manually set the
CONTENT-LENGTH slot of the REPLY object. If it is not NIL TBNL won't
bother to compute the content length so you can set it to any value
you want. Note, though, that you'll run into trouble
w.r.t. TBNL/Apache interaction if you set a wrong value there.
> because with current setup browsers that strictly adhere to the
> content-lenght (IE 6.0, Opera) would trim 1 character of the
> responses body for each UTF-8 character in it.
Nope, that's not how UTF-8 works.
Cheers,
Edi.
_______________________________________________
tbnl-announce site list
tbnl-announce(a)common-lisp.net
http://common-lisp.net/mailman/listinfo/tbnl-announce
Just for the benefit of those who might read this through
announcements(a)common-lisp.net: This is a new project and the current
release is 0.3.0. More info at:
<http://weitz.de/flexi-streams/>
Cheers,
Edi.
_______________________________________________
flexi-streams-announce mailing list
flexi-streams-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/flexi-streams-announce
ChangeLog:
Version 0.8.6
2005-11-18
Restored original stream-based code for multipart/form-data parsing (got lost somehow)
Wrap REMOTE-ADDR with IGNORE-ERRORS (just in case)
Download:
<http://weitz.de/files/tbnl.tar.gz>
Cheers,
Edi.
_______________________________________________
tbnl-announce site list
tbnl-announce(a)common-lisp.net
http://common-lisp.net/mailman/listinfo/tbnl-announce
On Sat, 12 Nov 2005 09:43:28 -0800 (PST), Jeff Caldwell <jdcal(a)yahoo.com> wrote:
> Here is a tiny patch for tbnl. The motivation is that I'm working
> with blocks of dispatch table entries that are added and withdrawn
> as modules without restarting tbnl. I'd also like reflective access
> to the dispatch table e.g. to show a web page of installed dispatch
> handlers.
Perhaps this would be something for the "contrib" directory of TBNL?
> To affect the base distrubution as little as possible, I took the
> loop through the dispatch table that funcalls each entry and moved
> that loop into a defmethod. Now I can specialize on the method and
> have my own dispatch mechanisms.
Thanks Jeff, I've just made a new release with these changes.
ChangeLog:
Version 0.8.5
2005-11-14
Added generic function DISPATCH-REQUEST (thanks to Jeff Caldwell)
Download:
<http://weitz.de/files/tbnl.tar.gz>
Cheers,
Edi.
_______________________________________________
tbnl-announce site list
tbnl-announce(a)common-lisp.net
http://common-lisp.net/mailman/listinfo/tbnl-announce
New release CL-WIKI 0.1.1
CL-WIKI is a wiki engine for Common Lisp. It uses TBNL, CL-PPCRE,
CL-WHO and CL-EMB. Can be used stand-alone, with Apache + mod_lisp,
or behind any http proxy.
You can download it from http://common-lisp.net/project/cl-wiki/
or install with ASDF-Install.
CL-USER> (asdf:operate 'asdf:load-op :asdf-install)
CL-USER> (asdf-install:install :cl-wiki)
Changes:
- Codes for lists, header, horizontal divider.
- Wiki-like handling of paragraphs and line breaks:
Multiple line breaks generate a new paragraph. Single line
breaks get removed.
Current development versions are always available in the darcs
repository http://common-lisp.net/project/cl-wiki/repos/cl-wiki_dev
Get darcs from http://www.darcs.net/ and then
darcs get http://common-lisp.net/project/cl-wiki/repos/cl-wiki_dev
Updating your local repository:
darcs pull
_______________________________________________
cl-wiki-announce mailing list
cl-wiki-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cl-wiki-announce
ChangeLog:
Version 1.2.12
2005-11-01
REGEX-APROPOS-AUX now also uses :INHERITED
Fixed typo in parser.lisp (thanks to Derek Peschel)
Fixed value of *REGEX-CHAR-CODE-LIMIT* in docs and test (thanks to Christophe Rhodes)
Download:
<http://weitz.de/files/cl-ppcre.tar.gz>
Cheers,
Edi.
_______________________________________________
cl-ppcre-announce mailing list
cl-ppcre-announce(a)common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cl-ppcre-announce