Upgrading to web-routes 0.26

1 view
Skip to first unread message

Antoine Latter

unread,
Jan 29, 2012, 4:43:15 PM1/29/12
to ha...@googlegroups.com
Hello,

I recently tried upgrading a web-app I've been toying with to newer
versions of libraries, including happstack-server 6.5 and web-routes
0.26.

Previously my app had been producing URLs of the form 'Location:
/User/UserLogin?loginRedirect=%2fPost%2fNew' but now produces URLs of
the form 'Location: //User/UserLogin?loginRedirect=%2fPost%2fNew',
which of course doesn't work ('User' is not a valid host).

I'd been invoking my web-routes site with the command 'implSite "/" ""
appSite', where 'appSite :: Site Sitemap (ServerPartT IO Response)'.

The goal was to have 'rooted' relative paths - that is, relative paths
without most of the pain that goes along with it.

I may be operating at the edge of how 'implSite' is supposed to be
used - it is hard to tell.

Thanks,
Antoine

Antoine Latter

unread,
Jan 29, 2012, 6:10:07 PM1/29/12
to ha...@googlegroups.com
On Sun, Jan 29, 2012 at 3:43 PM, Antoine Latter <asla...@gmail.com> wrote:
> Hello,
>
> I recently tried upgrading a web-app I've been toying with to newer
> versions of libraries, including happstack-server 6.5 and web-routes
> 0.26.
>
> Previously my app had been producing URLs of the form 'Location:
> /User/UserLogin?loginRedirect=%2fPost%2fNew' but now produces URLs of
> the form 'Location: //User/UserLogin?loginRedirect=%2fPost%2fNew',
> which of course doesn't work ('User' is not a valid host).
>
> I'd been invoking my web-routes site with the command 'implSite "/" ""
> appSite', where 'appSite :: Site Sitemap (ServerPartT IO Response)'.
>

Changing over to 'implSite "" ""' instead of 'implSite "/" ""' fixed
this for me.

Antoine

Reply all
Reply to author
Forward
0 new messages