Scheme-relative URLs (of form //server/path)

64 views
Skip to first unread message

Austen Holmes

unread,
Apr 16, 2013, 10:43:53 AM4/16/13
to lif...@googlegroups.com
Should scheme-relative urls be excluded from context path rewriting by default?  It's fairly common to use something like:


when serving content from a CDN.

This will allow you to not care about the scheme your application is using.

Also, how can I turn off context path rewriting for certain urls?

Thanks,

-Austen

Antonio Salazar Cardozo

unread,
Apr 16, 2013, 11:55:45 AM4/16/13
to lif...@googlegroups.com
Is context-path rewriting something Lift does or the container? I thought it was the container…
Thanks,
Antonio

Peter Brant

unread,
Apr 16, 2013, 12:14:28 PM4/16/13
to lif...@googlegroups.com
Nah, it's part of Lift (see LiftMerge#merge, called from LiftSession#performHeadMerge).

Pete



--
--
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 the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Antonio Salazar Cardozo

unread,
Apr 16, 2013, 12:24:47 PM4/16/13
to lif...@googlegroups.com
Got it. So we'd want to fix https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/Req.scala#L549 to test for startsWith("//") to fix this.

Austen, if you could go ahead and open an issue on Github, we can attend to it (bonus points if you want to include a patch ;) ).
Thanks,
Antonio

Austen Holmes

unread,
Apr 16, 2013, 3:49:33 PM4/16/13
to lif...@googlegroups.com
https://github.com/lift/framework/pull/1433

I don't do too much activity on github, so I accidentally created a dup issue (which I subsequently closed). Didn't realize pull requests got added to the issues list.

-Austen

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/4N0-Rkhb_1c/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.

Antonio Salazar Cardozo

unread,
Apr 16, 2013, 4:09:10 PM4/16/13
to lif...@googlegroups.com
No worries. Two things, which I'm not too worried about right now:
 - You should link to the ML discussion when opening issues/PRs. I'll do this for you :)
 - You can open an issue and then afterwards associate a pull request with that issue using the Github command-line tool via:
hub pull-request -i <ticket_number>
But! This will do for now :) Made a remark on the ticket.
Thanks,
Antonio

Austen Holmes

unread,
Apr 16, 2013, 4:25:43 PM4/16/13
to lif...@googlegroups.com
Thanks,

I guess you learn new things every day.  I didn't even realize there was a github command-line tool!

Antonio Salazar Cardozo

unread,
Apr 16, 2013, 4:37:28 PM4/16/13
to lif...@googlegroups.com
Yep, I didn't know you could attach PRs to existing issues until I saw the recommended flow for Lift :)
Thanks,
Antonio

Austen Holmes

unread,
Apr 18, 2013, 4:10:15 PM4/18/13
to lif...@googlegroups.com
Just an FYI,

Until the pull-request is merged, I added this to Boot as a workaround:

val checkPath = (s: String) => s.startsWith("//")

LiftRules.excludePathFromContextPathRewriting.default.set(checkPath)

Diego Medina

unread,
Apr 18, 2013, 4:17:29 PM4/18/13
to Lift
I haven't followed this conversation that closely but, could we leave
this one for 2.6, or do we really, really need it to 2.5?
We have been delaying 2.5 final for a while now, and if there is a way
around on the current codebase, I'd like to leave 2.5-RC5 (released
last night) become final in a couple of weeks

Thanks

Diego
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://fmpwizard.telegr.am

Austen Holmes

unread,
Apr 18, 2013, 5:00:04 PM4/18/13
to lif...@googlegroups.com
No problem here, since the workaround is pretty simple.  I'm all for getting 2.5 final out the door.

Diego Medina

unread,
Apr 18, 2013, 6:18:45 PM4/18/13
to Lift
Thanks!
Reply all
Reply to author
Forward
0 new messages