[cl-plus-ssl-devel] CL+SSL and stream-write-sequence

Anton Vodonosov avodonosov at yandex.ru
Tue Mar 19 16:38:50 UTC 2013


19.03.2013, 18:33, "Hans Hübner" <hans.huebner at gmail.com>:
> Anton, I could reproduce the problem with CL+SSL from gitorious and DRAKMA from github on OSX with SBCL.

As we clarified on #lisp, the test case is
   (drakma:http-request "https://google.com/" :method :post :parameters '(("a" . "b")))

19.03.2013, 16:12, "Anton Vodonosov" <avodonosov at yandex.ru>:
>
> It looks like the proper fix is to make functions b/v-replace v/b-replace
> to work not only with simple-arrays, but also with any sequence, including
> lists.
>
> For lisp implementations other than CLISP this is already the case - cl:replace
> is specified to handle any sequences.
>
> If so, it's necessary to fix that for CLISP. And b/v-replace, v/b-replace to something
> better (because it is now not buffer-vector-replace, but buffer-sequence-replace).

CLISP version of v/b-replaces is also uses cl:replace, so it is generic and handles any sequences.

Interestingly, CLISP versions b/v-replace was also able to work with adjustable arrays with fill-pointer,
not only with simple arrays. I've just improved it a little to also handle lists.

And removed the  (check-type thing (simple-array (unsigned-byte 8) (*))) from 
cl+ssl::stream-write-sequence and cl+ssl::stream-read-sequence.

Also renamed to v/b-replace, b/v-replace to s/b-replace, b/s-replace
("s" stands for "sequence" instead of "vector").

Tested the changes with CCL 1.8 on Windows, SBCL 1.1.1 and CLISP tip on linux.
Now the above test case correctly returns some error page and HTTP status
405 "Method Not Allowed".

Best regards,
- Anton





More information about the cl-plus-ssl-devel mailing list