URLs with +'s

24 views
Skip to first unread message

Joe Barnes

unread,
Mar 6, 2015, 10:11:58 PM3/6/15
to lif...@googlegroups.com
While working on npmaven, I decided to use Pamflet for generating the browser content.  I hit a snag when I discovered that Lift doesn't like a URL with a + in it, such as the Combined Pages link.  Lift will say the resource cannot be found.  Replacing each + with a %2B works like a charm, tho.

I don't quite see how I can make Lift accept a + in the link.  I can see a way where I could find all of the anchors in each document, replacing the +'s with %2B's.  I'm curious if there is an easy solution before I work too hard.  What is the best way to make these links work?  

Joe

Antonio Salazar Cardozo

unread,
Mar 11, 2015, 7:44:49 PM3/11/15
to lif...@googlegroups.com
This probably isn't Lift, but Jetty. More on the weirdnesses with + at http://stackoverflow.com/questions/1005676/urls-and-plus-signs .
I guess there may also be security concerns? See http://serverfault.com/questions/76013/iis6-vs-iis7-and-iis7-5-handling-urls-with-plus-sign-in-base-not-querystr .

I don't guarantee that it's Jetty, though—worth checking is whether we do any explicit URI decoding
or whether we let Jetty deal with it (I suspect the latter).
Thanks,
Antonio

Andreas Joseph Krogh

unread,
Mar 12, 2015, 3:41:44 AM3/12/15
to lif...@googlegroups.com
This issue rings a bell and I believe we've had this discussion before (searching the archives will probably tell). IIRC this is could (and should IMHO) be fixed in Lift but nobody has ever done anything to improve the situation.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 

Antonio Salazar Cardozo

unread,
Mar 12, 2015, 10:04:57 AM3/12/15
to lif...@googlegroups.com
If it's something we can clearly trace back to Lift, I'd probably be willing to look at fixing it,
depending on whether it would break other things.
Thanks,
Antonio

Joe Barnes

unread,
Mar 12, 2015, 11:52:33 AM3/12/15
to lif...@googlegroups.com
I'm gonna be quite busy in the coming days with Scaladays next week, so it's unlikely I'll have an opportunity to investigate this further any time soon.  For what it's worth, I got around it by writing a snippet that converted all of those links from +'s to %2B or whatever code it was. :)

Joe


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/DpHjrN5az2I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages