From: Pascal B. <pj...@in...> - 2017-08-22 14:43:41
|
> On 22 Aug 2017, at 16:13, Lucas Buchala <luc...@gm...> wrote: > > On Mon, Aug 21, 2017 at 9:47 PM, Bruno Haible <br...@cl...> wrote: >> As a consequence of the move from http://clisp.sourceforge.net/ >> to https://clisp.sourceforge.io/ the function DESCRIBE is now broken: > > Hello. I'm newbie in Lisp, but this error looked interesting, so I > went to take a look at src/clhs.lisp. > > I wonder if there's some problem in the function open-http, around line 198: > https://sourceforge.net/p/clisp/clisp/ci/default/tree/src/clhs.lisp#l198 > > It seems to expect an URL with prefix "http://" but a secure URL with > prefix "https://" is found in the "Location:" header instead, so it > ends up concatenating the strings: > > (unless (string-equal #1# new-url > :end2 (min (length new-url) #2#)) > (setq new-url (string-concat #1# host new-url))) Indeed, instead it should test for urls with a scheme prefix! (Any scheme!) Schemes are [A-Za-z][-+.A-Za-z0-9]* followed by a colon. So if the string matches ^[A-Za-z][-+.A-Za-z0-9]*: then it contains a scheme and it should not be considered a path, but a whole URI. https://en.wikipedia.org/wiki/Uniform_Resource_Identifier -- __Pascal J. Bourguignon__ |