Hmmm ... The scheme is changed, like you say, but the port is too, from 100
to #f, which is what I find surprising.

I cannot seem to find a way to update the uri without loosing the port.
What am doing wrong here?

K.
On May 13, 2014 1:48 PM, "Peter Bex" <peter....@xs4all.nl> wrote:

> On Tue, May 13, 2014 at 01:38:16PM +0200, Kristian Lein-Mathisen wrote:
> > Hi guys,
> >
> > I have come across som a bug or unintuitive behaviour in uri-common. The
> > port parameter is reset on update-uri. uri-generic works like expected:
> >
> > csi -R uri-generic
> > #;1> (update-uri (make-uri port: 100) scheme: 'http)
> > #(URI scheme=http authority=#(URIAuth host=#f port=100) path=() query=#f
> > fragment=#f)
> >
> > however, uri-common sets the port back to #f:
> >
> > csi -R uri-common
> > #;1> (update-uri (make-uri port: 100) scheme: 'http)
> > #<URI-common: scheme=http port=#f host=#f path=#f query=#f fragment=#f>
> >
> > I'm expecting to see port: 100 in the updated uri. A fairly simple
> > workaround is, of course, adding port: (uri-port original-uri) but I
> > thought I'd point this out.
>
> I don't remember exactly, but I think this is intended behaviour.
> This allows you to switch from http to https without also having to
> update the port to something else.
>
> Cheers,
> Peter
> --
> http://www.more-magic.net
>
> _______________________________________________
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to