[Lift] Re: S.hostName?

2009-07-14 Thread David Pollak
On Tue, Jul 14, 2009 at 3:04 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 This looks a little suspicious:

   /**
* The host that the request was made on
*/
   def hostName: String = servletRequest.map(_.getServerName).openOr(
 nowhere_123.com)

 Is there a reason that this wouldn't be configured to just return a Box?


Because it was written in 2006 before I understood boxes and options...
darned legacy.




 Derek

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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



[Lift] Re: S.hostName?

2009-07-14 Thread Derek Chen-Becker
Hmmm. Same thing on hostAndPath?

On Tue, Jul 14, 2009 at 4:07 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 I'm about to commit some documentation stuff in S.scala, so I can just
 modify it now.

 Derek


 On Tue, Jul 14, 2009 at 4:05 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Tue, Jul 14, 2009 at 3:04 PM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

 This looks a little suspicious:

   /**
* The host that the request was made on
*/
   def hostName: String = servletRequest.map(_.getServerName).openOr(
 nowhere_123.com)

 Is there a reason that this wouldn't be configured to just return a Box?


 Because it was written in 2006 before I understood boxes and options...
 darned legacy.




 Derek





 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp

 



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



[Lift] Re: S.hostName?

2009-07-14 Thread David Pollak
On Tue, Jul 14, 2009 at 3:12 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Hmmm. Same thing on hostAndPath?


yep.




 On Tue, Jul 14, 2009 at 4:07 PM, Derek Chen-Becker 
 dchenbec...@gmail.comwrote:

 I'm about to commit some documentation stuff in S.scala, so I can just
 modify it now.

 Derek


 On Tue, Jul 14, 2009 at 4:05 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Tue, Jul 14, 2009 at 3:04 PM, Derek Chen-Becker 
 dchenbec...@gmail.com wrote:

 This looks a little suspicious:

   /**
* The host that the request was made on
*/
   def hostName: String = servletRequest.map(_.getServerName).openOr(
 nowhere_123.com)

 Is there a reason that this wouldn't be configured to just return a Box?


 Because it was written in 2006 before I understood boxes and options...
 darned legacy.




 Derek





 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp





 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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



[Lift] Re: S.hostName?

2009-07-14 Thread Derek Chen-Becker
OK, docs and minor changes pushed. If someone is depending on things like
S.hostAndPath, S.hostName or S.contextPath, you'll need to update your code
to process a Box instead of a String.

Derek

On Tue, Jul 14, 2009 at 4:15 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Tue, Jul 14, 2009 at 3:12 PM, Derek Chen-Becker 
 dchenbec...@gmail.comwrote:

 Hmmm. Same thing on hostAndPath?


 yep.




 On Tue, Jul 14, 2009 at 4:07 PM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

 I'm about to commit some documentation stuff in S.scala, so I can just
 modify it now.

 Derek


 On Tue, Jul 14, 2009 at 4:05 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Tue, Jul 14, 2009 at 3:04 PM, Derek Chen-Becker 
 dchenbec...@gmail.com wrote:

 This looks a little suspicious:

   /**
* The host that the request was made on
*/
   def hostName: String = servletRequest.map(_.getServerName).openOr(
 nowhere_123.com)

 Is there a reason that this wouldn't be configured to just return a
 Box?


 Because it was written in 2006 before I understood boxes and options...
 darned legacy.




 Derek





 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp









 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp

 


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