Re: DESCRIBE broken after website move

Pascal Bourguignon <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <[email protected]>
> On 22 Aug 2017, at 16:13, Lucas Buchala <[email protected]> wrote:
> 
> On Mon, Aug 21, 2017 at 9:47 PM, Bruno Haible <[email protected]> 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__

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.