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

Showing 1-12 of 12 messages
Scheme-relative URLs (of form //server/path) Austen Holmes 4/16/13 7:43 AM
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
Re: Scheme-relative URLs (of form //server/path) Antonio Salazar Cardozo 4/16/13 8:55 AM
Is context-path rewriting something Lift does or the container? I thought it was the container…
Thanks,
Antonio
Re: [Lift] Scheme-relative URLs (of form //server/path) Peter Brant 4/16/13 9:14 AM
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.
 
 

Re: [Lift] Scheme-relative URLs (of form //server/path) Antonio Salazar Cardozo 4/16/13 9:24 AM
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
Re: [Lift] Scheme-relative URLs (of form //server/path) Austen Holmes 4/16/13 12:49 PM
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.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: [Lift] Scheme-relative URLs (of form //server/path) Antonio Salazar Cardozo 4/16/13 1:09 PM
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
Re: [Lift] Scheme-relative URLs (of form //server/path) Austen Holmes 4/16/13 1:25 PM
Thanks,

I guess you learn new things every day.  I didn't even realize there was a github command-line tool!
Re: [Lift] Scheme-relative URLs (of form //server/path) Antonio Salazar Cardozo 4/16/13 1:37 PM
Yep, I didn't know you could attach PRs to existing issues until I saw the recommended flow for Lift :)
Thanks,
Antonio
Re: [Lift] Scheme-relative URLs (of form //server/path) Austen Holmes 4/18/13 1:10 PM
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)
Re: [Lift] Scheme-relative URLs (of form //server/path) fmpwizard 4/18/13 1:17 PM
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
Re: [Lift] Scheme-relative URLs (of form //server/path) Austen Holmes 4/18/13 2:00 PM
No problem here, since the workaround is pretty simple.  I'm all for getting 2.5 final out the door.
Re: [Lift] Scheme-relative URLs (of form //server/path) fmpwizard 4/18/13 3:18 PM
Thanks!