Beef with LiftRules.explicitlyParsedSuffixes

26 views
Skip to first unread message

Timothy Perrett

unread,
Nov 25, 2009, 6:43:49 AM11/25/09
to Lift
Guys,

I have some major issues with LiftRules.explicitlyParsedSuffixes - I
just wasted almost a whole day yesterday chasing around what I thought
were bugs in my code but were actually issues with the new suffix
handling. The list of defaults are just wayyyy to narrow. Missing out
standard web formats like pdf, swf and that little know
format .txt ;-) This is causing me all sorts of hard-to-debug issues -
no errors, no warnings etc; just blank screens.

Can I suggest the list of defaults is made much larger and encompasses
all manner of formats and that some warning log messages are added to
Req so that if what you want is not in the list it gives you some note
to that effect. Ones that are obviously missing:

pdf
txt
tif
tiff

Cheers, Tim

Derek Chen-Becker

unread,
Nov 25, 2009, 8:35:20 AM11/25/09
to lif...@googlegroups.com
Was that what was preventing your dispatch from working?


--

You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.



Timothy Perrett

unread,
Nov 25, 2009, 8:49:39 AM11/25/09
to lif...@googlegroups.com
Yeah :-)

I had not realised that there was this list of "approved" extensions. I actually have a custom mime type and extension in my application and upgrading from M6 to SNAPSHOT caused this extremely difficult to debug situation.

As below, some warnings or something like that would really really help.

Cheers, Tim

Derek Chen-Becker

unread,
Nov 25, 2009, 9:51:53 AM11/25/09
to lif...@googlegroups.com
I would agree. In general I would lean toward being overly verbose about what's happening in Lift when in dev mode.

David Pollak

unread,
Nov 25, 2009, 10:34:29 AM11/25/09
to lif...@googlegroups.com
I'm not overly keen on the whitelist stuff.  Someone's going to get cranky about it.

I'm open to either adding a whole lot more to the white list or saying that everything < n characters (e.g., 5) is a suffix unless it's on a blacklist.
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

Timothy Perrett

unread,
Nov 25, 2009, 10:59:13 AM11/25/09
to lif...@googlegroups.com
Agreed - I work with lift every day and this was a new one on me!

I think adding a whole raft of common types would be the simplest way to go an be quickest to implement. If memory serves there is a fairly comprehensive list on IANA (or some similar acronym) that we could grab and implement - thoughts?

Cheers, Tim

Sent from my iPhone

David Pollak

unread,
Nov 25, 2009, 12:09:46 PM11/25/09
to lif...@googlegroups.com
On Wed, Nov 25, 2009 at 7:59 AM, Timothy Perrett <tim...@getintheloop.eu> wrote:
Agreed - I work with lift every day and this was a new one on me!

I think adding a whole raft of common types would be the simplest way to go an be quickest to implement. If memory serves there is a fairly comprehensive list on IANA (or some similar acronym) that we could grab and implement - thoughts?

Sounds good.  I'd rather see a fix sooner rather than later.  Can you open a ticket?  Can you own the ticket?
 

Timothy Perrett

unread,
Nov 25, 2009, 12:39:06 PM11/25/09
to lif...@googlegroups.com
Im all over it.  I'll have a fix on review board within the hour.

Cheers, Tim

Timothy Perrett

unread,
Nov 25, 2009, 1:38:14 PM11/25/09
to Lift
As promised:

http://reviewboard.liftweb.net/r/126/

These 447 extension types should cover mode dispatch use cases. Custom
extensions / mime types will still need to add to the list, but this
is alright IMHO. Your thoughts please!

Cheers, Tim

On Nov 25, 5:39 pm, Timothy Perrett <timo...@getintheloop.eu> wrote:
> Im all over it.  I'll have a fix on review board within the hour.
>
> Cheers, Tim
>
> On 25 Nov 2009, at 17:09, David Pollak wrote:
>
>
>
>
>
> > On Wed, Nov 25, 2009 at 7:59 AM, Timothy Perrett <timo...@getintheloop.eu> wrote:
> > Agreed - I work with lift every day and this was a new one on me!
>
> > I think adding a whole raft of common types would be the simplest way to go an be quickest to implement. If memory serves there is a fairly comprehensive list on IANA (or some similar acronym) that we could grab and implement - thoughts?
>
> > Sounds good.  I'd rather see a fix sooner rather than later.  Can you open a ticket?  Can you own the ticket?
>
> > Cheers, Tim
>
> > Sent from my iPhone
>
> > On 25 Nov 2009, at 15:34, David Pollak <feeder.of.the.be...@gmail.com> wrote:
>
> >> I'm not overly keen on the whitelist stuff.  Someone's going to get cranky about it.
>
> >> I'm open to either adding a whole lot more to the white list or saying that everything < n characters (e.g., 5) is a suffix unless it's on a blacklist.
>
> >> On Wed, Nov 25, 2009 at 5:49 AM, Timothy Perrett <timo...@getintheloop.eu> wrote:
> >> Yeah :-)
>
> >> I had not realised that there was this list of "approved" extensions. I actually have a custom mime type and extension in my application and upgrading from M6 to SNAPSHOT caused this extremely difficult to debug situation.
>
> >> As below, some warnings or something like that would really really help.
>
> >> Cheers, Tim
>
> >> On 25 Nov 2009, at 13:35, Derek Chen-Becker wrote:
>
> >> > Was that what was preventing your dispatch from working?
>
> >> > On Wed, Nov 25, 2009 at 4:43 AM, Timothy Perrett <timo...@getintheloop.eu> wrote:
> >> > Guys,
>
> >> > I have some major issues with LiftRules.explicitlyParsedSuffixes - I
> >> > just wasted almost a whole day yesterday chasing around what I thought
> >> > were bugs in my code but were actually issues with the new suffix
> >> > handling. The list of defaults are just wayyyy to narrow. Missing out
> >> > standard web formats like pdf, swf and that little know
> >> > format .txt ;-) This is causing me all sorts of hard-to-debug issues -
> >> > no errors, no warnings etc; just blank screens.
>
> >> > Can I suggest the list of defaults is made much larger and encompasses
> >> > all manner of formats and that some warning log messages are added to
> >> > Req so that if what you want is not in the list it gives you some note
> >> > to that effect. Ones that are obviously missing:
>
> >> > pdf
> >> > txt
> >> > tif
> >> > tiff
>
> >> > Cheers, Tim
>
> >> > --
>
> >> > You received this message because you are subscribed to the Google Groups "Lift" group.
> >> > To post to this group, send email to lif...@googlegroups.com.
> >> > To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> >> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> >> > --
>
> >> > You received this message because you are subscribed to the Google Groups "Lift" group.
> >> > To post to this group, send email to lif...@googlegroups.com.
> >> > To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> >> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> >> --
>
> >> You received this message because you are subscribed to the Google Groups "Lift" group.
> >> To post to this group, send email to lif...@googlegroups.com.
> >> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> >> --
> >> Lift, the simply functional web frameworkhttp://liftweb.net
> >> Beginning Scalahttp://www.apress.com/book/view/1430219890
> >> Follow me:http://twitter.com/dpp
> >> Surf the harmonics
>
> >> --
>
> >> You received this message because you are subscribed to the Google Groups "Lift" group.
> >> To post to this group, send email to lif...@googlegroups.com.
> >> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890

Naftoli Gugenheim

unread,
Nov 27, 2009, 3:04:46 PM11/27/09
to lif...@googlegroups.com
By the way Microsoft uses some really long suffixes, e.g., MS Access Developer Extension Deployment Wizard files, and Pocket PC emulator.

Marius

unread,
Nov 27, 2009, 4:52:50 PM11/27/09
to Lift
For a default behavior this is a reasonable approach. But from a
framework perspective this is a little limiting.

In order to be more extensible I think we should allow users to plug
in their own splitting functions (say a LiftRules RulesSeq of
functions) and essentially determine what is suffix and what is not
based on potentially some more complex rules. But that's just me ...


Br's,
Marius

Timothy Perrett

unread,
Nov 27, 2009, 6:31:17 PM11/27/09
to lif...@googlegroups.com
Hmm, I like this approach marius - its more elegant than what we have now.

What would be the overhead of such a system? It seems like this would better fit the lift configuration idioms also.

Cheers, Tim

David Pollak

unread,
Nov 30, 2009, 7:33:20 PM11/30/09
to lif...@googlegroups.com
On Fri, Nov 27, 2009 at 1:52 PM, Marius <marius...@gmail.com> wrote:
For a default behavior this is a reasonable approach. But from a
framework perspective this is a little limiting.

In order to be more extensible I think we should allow users to plug
in their own splitting functions (say a LiftRules RulesSeq of
functions) and essentially determine what is suffix and what is not
based on potentially some more complex rules. But that's just me ...

Okay, please open a ticket and make it happen.
 


Br's,
Marius

On Nov 27, 10:04 pm, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> By the way Microsoft uses some really long suffixes, e.g., MS Access Developer Extension Deployment Wizard files, and Pocket PC emulator.
>
> -----Original Message-----
> From: David Pollak <feeder.of.the.be...@gmail.com>
> Sent: Wednesday, November 25, 2009 10:34 AM
> To: lif...@googlegroups.com
> Subject: Re: [Lift] Beef with LiftRules.explicitlyParsedSuffixes
>
> I'm not overly keen on the whitelist stuff.  Someone's going to get cranky about it.
>
> I'm open to either adding a whole lot more to the white list or saying that everything < n characters (e.g., 5) is a suffix unless it's on a blacklist

--

You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.





--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890

Marius

unread,
Dec 2, 2009, 3:53:30 AM12/2/09
to Lift
I opened ticket http://github.com/dpp/liftweb/issues#issue/216 and
assign it to myself.

Br's,
Marius

> On Dec 1, 2:33 am, David Pollak <feeder.of.the.be...@gmail.com> wrote:
> > liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
Reply all
Reply to author
Forward
0 new messages