Michael Litchard | 1 Feb 01:29 2012

Introducing authenticate-ldap and yesod-auth-ldap

So I wrote something to help me authenticate against an ldap database,
found in my github account here:
https://github.com/mlitchard

as well as on Hackage.

Here's the problem, I have confirmed that my code seems to be doing
the Right Thing, yet I cannot get the sample code found in the beta
for the book to work.
http://www.yesodweb.com/home/snoyberg/book-beta/book/yesod-web-framework-book.ditamap?nav=example-blog

I think these are the following possibilities to explain this

(1) I don't understand subsites, and am missing something important
(2) My code isn't really doing the right thing, I just think it does.
(3) 0.10 is still beta and this problem has revealed a bug.
(4) I screwed up the last install of 0.10

Here's the code on hpaste, followed by my discussion of what happens,
and what to do next.

http://hpaste.org/57256

When I try and login, I get a freeze. I have a print statement in
getAuthId that tells me I get that far. I don't know where it's
freezing or why. How can I troubleshoot this?

Kazu Yamamoto | 1 Feb 02:53 2012
Picon

Re: Minor problem with yesod book

I think I understand this issue completely.

The latest network package has two problems:

1) "include/HsNetworkConfig.h.in" does not have HAVE_DECL_IPV6_V6ONLY.
    So, this macro is never enabled. This is my fault. I forget to include this when
    I sent the pull request to the network package.

2) "configure" is not re-generated. So, even if include/HsNetworkConfig.h.in has
    the macro, IPV6_V6ONLY option is not detected when "cabal configure".

I will fix this and sent pull request to the network package.

Sorry for your inconvenience.

--Kazu

On Tue, Jan 31, 2012 at 6:35 PM, Michael Snoyman <michael-cq0OxgmGHj5BDgjK7y7TUQ@public.gmane.org> wrote:
On Tue, Jan 31, 2012 at 11:30 AM, Erik de Castro Lopo
<mle+hs-GkEtBYYK+uT2eFz/2MeuCQ@public.gmane.org> wrote:
> Kazu Yamamoto wrote:
>
>> > - Does Yesod app bind to ::1?
>> >
>> > Yes.
>> >
>>
>> I guess this is the cause of this problem.
>>
>> Even if ipv6_v6only is true, your network package turns it false. So, if
>> you listens to all zero address, both IPv4 and IPv6 can be accepted.
>>
>> However, you specify IPv6's ::1 only. So, you cannot accept 1IPv4's
>> 27.0.0.1. Why do you bind to ::1 instead of all zero address ?
>
> I am not specify the port, just getting whatever is the default.
> I am running the example from the Yesod book:
>
>    main :: IO ()
>    main = warpDebug 3000 HelloWorld
>
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/

Hi Kazu,

If you look at this commit[1], it changed the behavior of Warp to
always select IPv6 addresses over IPv4. I think that's been the source
of the issue. Your notes say that using the IPv6 address would allow
it to work with either v4 or v6, but that doesn't seem to be working
on all OSes.

Perhaps we should change it so that there are two "special" host
values: "*" means bind to a v4 address, and "::1" means to bind to a
v6 address. We'll keep "*" as the default, hopefully solving Erik's
issue (and many other users). For people wanting to host a server over
v4 or v6, they need to pass in the extra "::1" parameter.

Michael

[1] https://github.com/yesodweb/wai/commit/02c1396c86e3fceb48cbe7df58cb631c804e24d4

Kazu Yamamoto | 1 Feb 07:50 2012
Picon

Re: Minor problem with yesod book

Hi,

It appeared that 1) is the same as 2). autoreconf generates HsNetworkConfig.h.in.

To my surprise, it also appeared that the basic function setSocketOptions is buggy.  See:

   https://github.com/haskell/network/pull/23

--Kazu

On Wed, Feb 1, 2012 at 10:53 AM, Kazu Yamamoto <kazu.yamamoto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I think I understand this issue completely.

The latest network package has two problems:

1) "include/HsNetworkConfig.h.in" does not have HAVE_DECL_IPV6_V6ONLY.
    So, this macro is never enabled. This is my fault. I forget to include this when
    I sent the pull request to the network package.

2) "configure" is not re-generated. So, even if include/HsNetworkConfig.h.in has
    the macro, IPV6_V6ONLY option is not detected when "cabal configure".

I will fix this and sent pull request to the network package.

Sorry for your inconvenience.

--Kazu


On Tue, Jan 31, 2012 at 6:35 PM, Michael Snoyman <michael-cq0OxgmGHj5BDgjK7y7TUQ@public.gmane.org> wrote:
On Tue, Jan 31, 2012 at 11:30 AM, Erik de Castro Lopo
<mle+hs <at> mega-nerd.com> wrote:
> Kazu Yamamoto wrote:
>
>> > - Does Yesod app bind to ::1?
>> >
>> > Yes.
>> >
>>
>> I guess this is the cause of this problem.
>>
>> Even if ipv6_v6only is true, your network package turns it false. So, if
>> you listens to all zero address, both IPv4 and IPv6 can be accepted.
>>
>> However, you specify IPv6's ::1 only. So, you cannot accept 1IPv4's
>> 27.0.0.1. Why do you bind to ::1 instead of all zero address ?
>
> I am not specify the port, just getting whatever is the default.
> I am running the example from the Yesod book:
>
>    main :: IO ()
>    main = warpDebug 3000 HelloWorld
>
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/

Hi Kazu,

If you look at this commit[1], it changed the behavior of Warp to
always select IPv6 addresses over IPv4. I think that's been the source
of the issue. Your notes say that using the IPv6 address would allow
it to work with either v4 or v6, but that doesn't seem to be working
on all OSes.

Perhaps we should change it so that there are two "special" host
values: "*" means bind to a v4 address, and "::1" means to bind to a
v6 address. We'll keep "*" as the default, hopefully solving Erik's
issue (and many other users). For people wanting to host a server over
v4 or v6, they need to pass in the extra "::1" parameter.

Michael

[1] https://github.com/yesodweb/wai/commit/02c1396c86e3fceb48cbe7df58cb631c804e24d4


Michael Snoyman | 1 Feb 09:17 2012

Re: Minor problem with yesod book

Hi Kazu,

As a short-term fix, do you see a problem with the following commit:
https://github.com/yesodweb/wai/commit/9c85a38d4730955f5904cf4ac36b7f16e4661b8d

Erik: Can you confirm that, with the new code, Warp binds to IPv4 by default?

Thanks,
Michael

On Wed, Feb 1, 2012 at 8:50 AM, Kazu Yamamoto
<kazu.yamamoto@...> wrote:
> Hi,
>
> It appeared that 1) is the same as 2). autoreconf generates
> HsNetworkConfig.h.in.
>
> To my surprise, it also appeared that the basic function setSocketOptions is
> buggy.  See:
>
>    https://github.com/haskell/network/pull/23
>
> --Kazu
>
>
> On Wed, Feb 1, 2012 at 10:53 AM, Kazu Yamamoto <kazu.yamamoto@...>
> wrote:
>>
>> I think I understand this issue completely.
>>
>> The latest network package has two problems:
>>
>> 1) "include/HsNetworkConfig.h.in" does not have HAVE_DECL_IPV6_V6ONLY.
>>     So, this macro is never enabled. This is my fault. I forget to include
>> this when
>>     I sent the pull request to the network package.
>>
>> 2) "configure" is not re-generated. So, even if
>> include/HsNetworkConfig.h.in has
>>     the macro, IPV6_V6ONLY option is not detected when "cabal configure".
>>
>> I will fix this and sent pull request to the network package.
>>
>> Sorry for your inconvenience.
>>
>> --Kazu
>>
>>
>> On Tue, Jan 31, 2012 at 6:35 PM, Michael Snoyman <michael@...>
>> wrote:
>>>
>>> On Tue, Jan 31, 2012 at 11:30 AM, Erik de Castro Lopo
>>> <mle+hs@...> wrote:
>>> > Kazu Yamamoto wrote:
>>> >
>>> >> > - Does Yesod app bind to ::1?
>>> >> >
>>> >> > Yes.
>>> >> >
>>> >>
>>> >> I guess this is the cause of this problem.
>>> >>
>>> >> Even if ipv6_v6only is true, your network package turns it false. So,
>>> >> if
>>> >> you listens to all zero address, both IPv4 and IPv6 can be accepted.
>>> >>
>>> >> However, you specify IPv6's ::1 only. So, you cannot accept 1IPv4's
>>> >> 27.0.0.1. Why do you bind to ::1 instead of all zero address ?
>>> >
>>> > I am not specify the port, just getting whatever is the default.
>>> > I am running the example from the Yesod book:
>>> >
>>> >    main :: IO ()
>>> >    main = warpDebug 3000 HelloWorld
>>> >
>>> > Erik
>>> > --
>>> > ----------------------------------------------------------------------
>>> > Erik de Castro Lopo
>>> > http://www.mega-nerd.com/
>>>
>>> Hi Kazu,
>>>
>>> If you look at this commit[1], it changed the behavior of Warp to
>>> always select IPv6 addresses over IPv4. I think that's been the source
>>> of the issue. Your notes say that using the IPv6 address would allow
>>> it to work with either v4 or v6, but that doesn't seem to be working
>>> on all OSes.
>>>
>>> Perhaps we should change it so that there are two "special" host
>>> values: "*" means bind to a v4 address, and "::1" means to bind to a
>>> v6 address. We'll keep "*" as the default, hopefully solving Erik's
>>> issue (and many other users). For people wanting to host a server over
>>> v4 or v6, they need to pass in the extra "::1" parameter.
>>>
>>> Michael
>>>
>>> [1]
>>> https://github.com/yesodweb/wai/commit/02c1396c86e3fceb48cbe7df58cb631c804e24d4
>>
>>
>

Kazu Yamamoto | 1 Feb 10:39 2012
Picon

Re: Minor problem with yesod book

Wearing IPv6 guy's hat, I would say that getaddrinfo() is designed to avoid this kind of protocol dependent coding.

  http://mew.org/~kazu/doc/piprog/index.html

Can't we wait for new network package?

--Kazu

On Wed, Feb 1, 2012 at 5:17 PM, Michael Snoyman <michael-cq0OxgmGHj5BDgjK7y7TUQ@public.gmane.org> wrote:
Hi Kazu,

As a short-term fix, do you see a problem with the following commit:
https://github.com/yesodweb/wai/commit/9c85a38d4730955f5904cf4ac36b7f16e4661b8d

Erik: Can you confirm that, with the new code, Warp binds to IPv4 by default?

Thanks,
Michael

On Wed, Feb 1, 2012 at 8:50 AM, Kazu Yamamoto <kazu.yamamoto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> It appeared that 1) is the same as 2). autoreconf generates
> HsNetworkConfig.h.in.
>
> To my surprise, it also appeared that the basic function setSocketOptions is
> buggy.  See:
>
>    https://github.com/haskell/network/pull/23
>
> --Kazu
>
>
> On Wed, Feb 1, 2012 at 10:53 AM, Kazu Yamamoto <kazu.yamamoto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> wrote:
>>
>> I think I understand this issue completely.
>>
>> The latest network package has two problems:
>>
>> 1) "include/HsNetworkConfig.h.in" does not have HAVE_DECL_IPV6_V6ONLY.
>>     So, this macro is never enabled. This is my fault. I forget to include
>> this when
>>     I sent the pull request to the network package.
>>
>> 2) "configure" is not re-generated. So, even if
>> include/HsNetworkConfig.h.in has
>>     the macro, IPV6_V6ONLY option is not detected when "cabal configure".
>>
>> I will fix this and sent pull request to the network package.
>>
>> Sorry for your inconvenience.
>>
>> --Kazu
>>
>>
>> On Tue, Jan 31, 2012 at 6:35 PM, Michael Snoyman <michael-cq0OxgmGHj5BDgjK7y7TUQ@public.gmane.org>
>> wrote:
>>>
>>> On Tue, Jan 31, 2012 at 11:30 AM, Erik de Castro Lopo
>>> <mle+hs <at> mega-nerd.com> wrote:
>>> > Kazu Yamamoto wrote:
>>> >
>>> >> > - Does Yesod app bind to ::1?
>>> >> >
>>> >> > Yes.
>>> >> >
>>> >>
>>> >> I guess this is the cause of this problem.
>>> >>
>>> >> Even if ipv6_v6only is true, your network package turns it false. So,
>>> >> if
>>> >> you listens to all zero address, both IPv4 and IPv6 can be accepted.
>>> >>
>>> >> However, you specify IPv6's ::1 only. So, you cannot accept 1IPv4's
>>> >> 27.0.0.1. Why do you bind to ::1 instead of all zero address ?
>>> >
>>> > I am not specify the port, just getting whatever is the default.
>>> > I am running the example from the Yesod book:
>>> >
>>> >    main :: IO ()
>>> >    main = warpDebug 3000 HelloWorld
>>> >
>>> > Erik
>>> > --
>>> > ----------------------------------------------------------------------
>>> > Erik de Castro Lopo
>>> > http://www.mega-nerd.com/
>>>
>>> Hi Kazu,
>>>
>>> If you look at this commit[1], it changed the behavior of Warp to
>>> always select IPv6 addresses over IPv4. I think that's been the source
>>> of the issue. Your notes say that using the IPv6 address would allow
>>> it to work with either v4 or v6, but that doesn't seem to be working
>>> on all OSes.
>>>
>>> Perhaps we should change it so that there are two "special" host
>>> values: "*" means bind to a v4 address, and "::1" means to bind to a
>>> v6 address. We'll keep "*" as the default, hopefully solving Erik's
>>> issue (and many other users). For people wanting to host a server over
>>> v4 or v6, they need to pass in the extra "::1" parameter.
>>>
>>> Michael
>>>
>>> [1]
>>> https://github.com/yesodweb/wai/commit/02c1396c86e3fceb48cbe7df58cb631c804e24d4
>>
>>
>

Kazu Yamamoto | 1 Feb 10:44 2012
Picon

Re: Minor problem with yesod book

Note that many Linux distributions and Mac set IPV6_V6ONLY to 0 by default. No problem.

Some Linux distributions and BSD variants set IPV6_V6ONLY to 1. This causes a problem.

A question here is whether or not we can wait the new network package, understanding that
problems can occur in limited environment.

--Kazu

On Wed, Feb 1, 2012 at 6:39 PM, Kazu Yamamoto <kazu.yamamoto-Re5JQEeQqe8@public.gmane.orgm> wrote:
Wearing IPv6 guy's hat, I would say that getaddrinfo() is designed to avoid this kind of protocol dependent coding.

  http://mew.org/~kazu/doc/piprog/index.html

Can't we wait for new network package?

--Kazu


On Wed, Feb 1, 2012 at 5:17 PM, Michael Snoyman <michael-cq0OxgmGHj5BDgjK7y7TUQ@public.gmane.org> wrote:
Hi Kazu,

As a short-term fix, do you see a problem with the following commit:
https://github.com/yesodweb/wai/commit/9c85a38d4730955f5904cf4ac36b7f16e4661b8d

Erik: Can you confirm that, with the new code, Warp binds to IPv4 by default?

Thanks,
Michael

On Wed, Feb 1, 2012 at 8:50 AM, Kazu Yamamoto <kazu.yamamoto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> It appeared that 1) is the same as 2). autoreconf generates
> HsNetworkConfig.h.in.
>
> To my surprise, it also appeared that the basic function setSocketOptions is
> buggy.  See:
>
>    https://github.com/haskell/network/pull/23
>
> --Kazu
>
>
> On Wed, Feb 1, 2012 at 10:53 AM, Kazu Yamamoto <kazu.yamamoto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> wrote:
>>
>> I think I understand this issue completely.
>>
>> The latest network package has two problems:
>>
>> 1) "include/HsNetworkConfig.h.in" does not have HAVE_DECL_IPV6_V6ONLY.
>>     So, this macro is never enabled. This is my fault. I forget to include
>> this when
>>     I sent the pull request to the network package.
>>
>> 2) "configure" is not re-generated. So, even if
>> include/HsNetworkConfig.h.in has
>>     the macro, IPV6_V6ONLY option is not detected when "cabal configure".
>>
>> I will fix this and sent pull request to the network package.
>>
>> Sorry for your inconvenience.
>>
>> --Kazu
>>
>>
>> On Tue, Jan 31, 2012 at 6:35 PM, Michael Snoyman <michael-cq0OxgmGHj5BDgjK7y7TUQ@public.gmane.org>
>> wrote:
>>>
>>> On Tue, Jan 31, 2012 at 11:30 AM, Erik de Castro Lopo
>>> <mle+hs-GkEtBYYK+uT2eFz/2MeuCQ@public.gmane.org> wrote:
>>> > Kazu Yamamoto wrote:
>>> >
>>> >> > - Does Yesod app bind to ::1?
>>> >> >
>>> >> > Yes.
>>> >> >
>>> >>
>>> >> I guess this is the cause of this problem.
>>> >>
>>> >> Even if ipv6_v6only is true, your network package turns it false. So,
>>> >> if
>>> >> you listens to all zero address, both IPv4 and IPv6 can be accepted.
>>> >>
>>> >> However, you specify IPv6's ::1 only. So, you cannot accept 1IPv4's
>>> >> 27.0.0.1. Why do you bind to ::1 instead of all zero address ?
>>> >
>>> > I am not specify the port, just getting whatever is the default.
>>> > I am running the example from the Yesod book:
>>> >
>>> >    main :: IO ()
>>> >    main = warpDebug 3000 HelloWorld
>>> >
>>> > Erik
>>> > --
>>> > ----------------------------------------------------------------------
>>> > Erik de Castro Lopo
>>> > http://www.mega-nerd.com/
>>>
>>> Hi Kazu,
>>>
>>> If you look at this commit[1], it changed the behavior of Warp to
>>> always select IPv6 addresses over IPv4. I think that's been the source
>>> of the issue. Your notes say that using the IPv6 address would allow
>>> it to work with either v4 or v6, but that doesn't seem to be working
>>> on all OSes.
>>>
>>> Perhaps we should change it so that there are two "special" host
>>> values: "*" means bind to a v4 address, and "::1" means to bind to a
>>> v6 address. We'll keep "*" as the default, hopefully solving Erik's
>>> issue (and many other users). For people wanting to host a server over
>>> v4 or v6, they need to pass in the extra "::1" parameter.
>>>
>>> Michael
>>>
>>> [1]
>>> https://github.com/yesodweb/wai/commit/02c1396c86e3fceb48cbe7df58cb631c804e24d4
>>
>>
>


Michael Snoyman | 1 Feb 11:17 2012

Re: Minor problem with yesod book

It's difficult to wait on this issue longer, I've been getting these
reports for a long time, and network hasn't been fixed yet to the
point where it solves the problem. Also, some people will be on older
versions of network for a while.

I would say once there's a version of network out that solves the
problem fully, we can conditionally change the default host value to
HostIPv6 (which is our current behavior).

On Wed, Feb 1, 2012 at 11:44 AM, Kazu Yamamoto
<kazu.yamamoto@...> wrote:
> Note that many Linux distributions and Mac set IPV6_V6ONLY to 0 by default.
> No problem.
>
> Some Linux distributions and BSD variants set IPV6_V6ONLY to 1. This causes
> a problem.
>
> A question here is whether or not we can wait the new network package,
> understanding that
> problems can occur in limited environment.
>
> --Kazu
>
>
> On Wed, Feb 1, 2012 at 6:39 PM, Kazu Yamamoto <kazu.yamamoto@...>
> wrote:
>>
>> Wearing IPv6 guy's hat, I would say that getaddrinfo() is designed to
>> avoid this kind of protocol dependent coding.
>>
>>   http://mew.org/~kazu/doc/piprog/index.html
>>
>> Can't we wait for new network package?
>>
>> --Kazu
>>
>>
>> On Wed, Feb 1, 2012 at 5:17 PM, Michael Snoyman <michael@...>
>> wrote:
>>>
>>> Hi Kazu,
>>>
>>> As a short-term fix, do you see a problem with the following commit:
>>>
>>> https://github.com/yesodweb/wai/commit/9c85a38d4730955f5904cf4ac36b7f16e4661b8d
>>>
>>> Erik: Can you confirm that, with the new code, Warp binds to IPv4 by
>>> default?
>>>
>>> Thanks,
>>> Michael
>>>
>>> On Wed, Feb 1, 2012 at 8:50 AM, Kazu Yamamoto <kazu.yamamoto@...>
>>> wrote:
>>> > Hi,
>>> >
>>> > It appeared that 1) is the same as 2). autoreconf generates
>>> > HsNetworkConfig.h.in.
>>> >
>>> > To my surprise, it also appeared that the basic function
>>> > setSocketOptions is
>>> > buggy.  See:
>>> >
>>> >    https://github.com/haskell/network/pull/23
>>> >
>>> > --Kazu
>>> >
>>> >
>>> > On Wed, Feb 1, 2012 at 10:53 AM, Kazu Yamamoto
>>> > <kazu.yamamoto@...>
>>> > wrote:
>>> >>
>>> >> I think I understand this issue completely.
>>> >>
>>> >> The latest network package has two problems:
>>> >>
>>> >> 1) "include/HsNetworkConfig.h.in" does not have HAVE_DECL_IPV6_V6ONLY.
>>> >>     So, this macro is never enabled. This is my fault. I forget to
>>> >> include
>>> >> this when
>>> >>     I sent the pull request to the network package.
>>> >>
>>> >> 2) "configure" is not re-generated. So, even if
>>> >> include/HsNetworkConfig.h.in has
>>> >>     the macro, IPV6_V6ONLY option is not detected when "cabal
>>> >> configure".
>>> >>
>>> >> I will fix this and sent pull request to the network package.
>>> >>
>>> >> Sorry for your inconvenience.
>>> >>
>>> >> --Kazu
>>> >>
>>> >>
>>> >> On Tue, Jan 31, 2012 at 6:35 PM, Michael Snoyman <michael@...m>
>>> >> wrote:
>>> >>>
>>> >>> On Tue, Jan 31, 2012 at 11:30 AM, Erik de Castro Lopo
>>> >>> <mle+hs@...> wrote:
>>> >>> > Kazu Yamamoto wrote:
>>> >>> >
>>> >>> >> > - Does Yesod app bind to ::1?
>>> >>> >> >
>>> >>> >> > Yes.
>>> >>> >> >
>>> >>> >>
>>> >>> >> I guess this is the cause of this problem.
>>> >>> >>
>>> >>> >> Even if ipv6_v6only is true, your network package turns it false.
>>> >>> >> So,
>>> >>> >> if
>>> >>> >> you listens to all zero address, both IPv4 and IPv6 can be
>>> >>> >> accepted.
>>> >>> >>
>>> >>> >> However, you specify IPv6's ::1 only. So, you cannot accept
>>> >>> >> 1IPv4's
>>> >>> >> 27.0.0.1. Why do you bind to ::1 instead of all zero address ?
>>> >>> >
>>> >>> > I am not specify the port, just getting whatever is the default.
>>> >>> > I am running the example from the Yesod book:
>>> >>> >
>>> >>> >    main :: IO ()
>>> >>> >    main = warpDebug 3000 HelloWorld
>>> >>> >
>>> >>> > Erik
>>> >>> > --
>>> >>> >
>>> >>> > ----------------------------------------------------------------------
>>> >>> > Erik de Castro Lopo
>>> >>> > http://www.mega-nerd.com/
>>> >>>
>>> >>> Hi Kazu,
>>> >>>
>>> >>> If you look at this commit[1], it changed the behavior of Warp to
>>> >>> always select IPv6 addresses over IPv4. I think that's been the
>>> >>> source
>>> >>> of the issue. Your notes say that using the IPv6 address would allow
>>> >>> it to work with either v4 or v6, but that doesn't seem to be working
>>> >>> on all OSes.
>>> >>>
>>> >>> Perhaps we should change it so that there are two "special" host
>>> >>> values: "*" means bind to a v4 address, and "::1" means to bind to a
>>> >>> v6 address. We'll keep "*" as the default, hopefully solving Erik's
>>> >>> issue (and many other users). For people wanting to host a server
>>> >>> over
>>> >>> v4 or v6, they need to pass in the extra "::1" parameter.
>>> >>>
>>> >>> Michael
>>> >>>
>>> >>> [1]
>>> >>>
>>> >>> https://github.com/yesodweb/wai/commit/02c1396c86e3fceb48cbe7df58cb631c804e24d4
>>> >>
>>> >>
>>> >
>>
>>
>

Michael Snoyman | 1 Feb 11:56 2012

Re: Introducing authenticate-ldap and yesod-auth-ldap

There was a Warp hangin.g bug that was just quashed last night,
perhaps that was the problem. Can you try pulling from Github and
trying again?

On Wed, Feb 1, 2012 at 2:29 AM, Michael Litchard <michael@...> wrote:
> So I wrote something to help me authenticate against an ldap database,
> found in my github account here:
> https://github.com/mlitchard
>
> as well as on Hackage.
>
>
> Here's the problem, I have confirmed that my code seems to be doing
> the Right Thing, yet I cannot get the sample code found in the beta
> for the book to work.
> http://www.yesodweb.com/home/snoyberg/book-beta/book/yesod-web-framework-book.ditamap?nav=example-blog
>
> I think these are the following possibilities to explain this
>
> (1) I don't understand subsites, and am missing something important
> (2) My code isn't really doing the right thing, I just think it does.
> (3) 0.10 is still beta and this problem has revealed a bug.
> (4) I screwed up the last install of 0.10
>
>
> Here's the code on hpaste, followed by my discussion of what happens,
> and what to do next.
>
> http://hpaste.org/57256
>
> When I try and login, I get a freeze. I have a print statement in
> getAuthId that tells me I get that far. I don't know where it's
> freezing or why. How can I troubleshoot this?

Michael Litchard | 1 Feb 22:40 2012

Re: Introducing authenticate-ldap and yesod-auth-ldap

I almost cried when I got to the end of the install chain, and the
original demo code from the book doesn't compile. Fortunately you had
updated the code on the website, and I made the appropriate changes.
My code works. Yay! I feel like I just joined a club. Now I need to
focus on making it better, but I'm not sure where to start. This is my
guess, you figure out what needs to be improved through usage, and
other people's reports. So I'm going to go integrate with my current
Yesod projects and see what happens.

On Wed, Feb 1, 2012 at 2:56 AM, Michael Snoyman <michael@...> wrote:
> There was a Warp hangin.g bug that was just quashed last night,
> perhaps that was the problem. Can you try pulling from Github and
> trying again?
>
> On Wed, Feb 1, 2012 at 2:29 AM, Michael Litchard <michael@...> wrote:
>> So I wrote something to help me authenticate against an ldap database,
>> found in my github account here:
>> https://github.com/mlitchard
>>
>> as well as on Hackage.
>>
>>
>> Here's the problem, I have confirmed that my code seems to be doing
>> the Right Thing, yet I cannot get the sample code found in the beta
>> for the book to work.
>> http://www.yesodweb.com/home/snoyberg/book-beta/book/yesod-web-framework-book.ditamap?nav=example-blog
>>
>> I think these are the following possibilities to explain this
>>
>> (1) I don't understand subsites, and am missing something important
>> (2) My code isn't really doing the right thing, I just think it does.
>> (3) 0.10 is still beta and this problem has revealed a bug.
>> (4) I screwed up the last install of 0.10
>>
>>
>> Here's the code on hpaste, followed by my discussion of what happens,
>> and what to do next.
>>
>> http://hpaste.org/57256
>>
>> When I try and login, I get a freeze. I have a print statement in
>> getAuthId that tells me I get that far. I don't know where it's
>> freezing or why. How can I troubleshoot this?

jcm | 1 Feb 22:54 2012
Picon

UTCTime in route

Hello,

I am using yesod 0.9.4.1

I am using Persistent and I have attributes with type UTCTime

When I write a route with these type (i.e getSth/#UTCTime), I get the
following compile error.

Foundation.hs:81:1:
    No instance for (SinglePiece UTCTime)
      arising from a use of `toSinglePiece'
    Possible fix: add an instance declaration for (SinglePiece
UTCTime)
    In the first argument of `(:)', namely `toSinglePiece var8'
    In the second argument of `(:)', namely
      `(:)
         (toSinglePiece var8)
         ((:) (toSinglePiece var9) ((:) (toSinglePiece var10) []))'
    In the second argument of `(:)', namely
      `(:)
         (toSinglePiece var7)
         ((:)
            (toSinglePiece var8)
            ((:) (toSinglePiece var9) ((:) (toSinglePiece var10)
[])))'

I do not really understand what happens since everything seems to be
fine with other persistent types (except Double).

Thank you

Regards

J-C


Gmane