You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by me...@apache.org on 2008/11/12 21:24:44 UTC

svn commit: r713495 - in /incubator/jspwiki/trunk: ChangeLog src/com/ecyrd/jspwiki/Release.java src/com/ecyrd/jspwiki/WikiEngine.java

Author: metskem
Date: Wed Nov 12 12:24:43 2008
New Revision: 713495

URL: http://svn.apache.org/viewvc?rev=713495&view=rev
Log:
3.0.0-svn-6 JSPWIKI-424: append trailing "/" to baseURL

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=713495&r1=713494&r2=713495&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Wed Nov 12 12:24:43 2008
@@ -1,3 +1,9 @@
+2008-11-10 Harry Metske <me...@apache.org>
+
+        * 3.0.0-svn-6
+        
+        * JSPWIKI-424: Enforce (autofix) baseURL property to end with trailing slash, reported by John Volkar
+
 2008-11-10  Janne Jalkanen <ja...@apache.org>
 
         * 3.0.0-svn-5

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java?rev=713495&r1=713494&r2=713495&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java Wed Nov 12 12:24:43 2008
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "5";
+    public static final String     BUILD         = "6";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java?rev=713495&r1=713494&r2=713495&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java Wed Nov 12 12:24:43 2008
@@ -498,7 +498,11 @@
                                                         m_saveUserInfo );
 
         m_useUTF8        = "UTF-8".equals( TextUtil.getStringProperty( props, PROP_ENCODING, "ISO-8859-1" ) );
-        m_baseURL        = TextUtil.getStringProperty( props, PROP_BASEURL, "" );
+        m_baseURL = TextUtil.getStringProperty( props, PROP_BASEURL, "" );
+        if( !m_baseURL.endsWith( "/" ) )
+        {
+            m_baseURL = m_baseURL + "/";
+        }
 
 
         m_beautifyTitle  = TextUtil.getBooleanProperty( props,



Re: svn commit: r713495 - in /incubator/jspwiki/trunk: ChangeLog src/com/ecyrd/jspwiki/Release.java src/com/ecyrd/jspwiki/WikiEngine.java

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
My point being that if this is a problem with newbies who do not  
understand that the slash is required, they will need the slash; but  
if you've got an exotic configuration you're probably savvy enough to  
know what you want, and in that case you don't really want the engine  
to change your configs based on what it thinks is good.

Hence fixing it in the installer instead of the WikiEngine.

/Janne

On 12 Nov 2008, at 23:03, Harry Metske wrote:

> Well, to be honest, I don't see the problem, could you explain a  
> bit more ?
>
> And I think WikiEngine is a better place,  people don't always use the
> Installer, if you modify the jspwiki.properties by hand we now still
> tolerate the absence of the trailing slash.
>
> regards,
> Harry
>
> 2008/11/12 Janne Jalkanen <Ja...@ecyrd.com>
>
>>
>> Isn't this a problem if someones base path ends with a non-slash  
>> thing?
>>  For example, "http://myorg/myredirectservlet?redirurl="
>>
>> Better to fix in the installer?
>>
>> /Janne
>>
>>
>>  --- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java
>>> (original)
>>> +++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java  
>>> Wed Nov
>>> 12 12:24:43 2008
>>> @@ -498,7 +498,11 @@
>>>                                                          
>>> m_saveUserInfo );
>>>
>>>         m_useUTF8        = "UTF-8".equals 
>>> ( TextUtil.getStringProperty(
>>> props, PROP_ENCODING, "ISO-8859-1" ) );
>>> -        m_baseURL        = TextUtil.getStringProperty( props,
>>> PROP_BASEURL, "" );
>>> +        m_baseURL = TextUtil.getStringProperty( props,  
>>> PROP_BASEURL, ""
>>> );
>>> +        if( !m_baseURL.endsWith( "/" ) )
>>> +        {
>>> +            m_baseURL = m_baseURL + "/";
>>> +        }
>>>
>>>
>>>         m_beautifyTitle  = TextUtil.getBooleanProperty( props,
>>>
>>>
>>


Re: svn commit: r713495 - in /incubator/jspwiki/trunk: ChangeLog src/com/ecyrd/jspwiki/Release.java src/com/ecyrd/jspwiki/WikiEngine.java

Posted by Harry Metske <ha...@gmail.com>.
Well, to be honest, I don't see the problem, could you explain a bit more ?

And I think WikiEngine is a better place,  people don't always use the
Installer, if you modify the jspwiki.properties by hand we now still
tolerate the absence of the trailing slash.

regards,
Harry

2008/11/12 Janne Jalkanen <Ja...@ecyrd.com>

>
> Isn't this a problem if someones base path ends with a non-slash thing?
>  For example, "http://myorg/myredirectservlet?redirurl="
>
> Better to fix in the installer?
>
> /Janne
>
>
>  --- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java
>> (original)
>> +++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java Wed Nov
>> 12 12:24:43 2008
>> @@ -498,7 +498,11 @@
>>                                                         m_saveUserInfo );
>>
>>         m_useUTF8        = "UTF-8".equals( TextUtil.getStringProperty(
>> props, PROP_ENCODING, "ISO-8859-1" ) );
>> -        m_baseURL        = TextUtil.getStringProperty( props,
>> PROP_BASEURL, "" );
>> +        m_baseURL = TextUtil.getStringProperty( props, PROP_BASEURL, ""
>> );
>> +        if( !m_baseURL.endsWith( "/" ) )
>> +        {
>> +            m_baseURL = m_baseURL + "/";
>> +        }
>>
>>
>>         m_beautifyTitle  = TextUtil.getBooleanProperty( props,
>>
>>
>

Re: svn commit: r713495 - in /incubator/jspwiki/trunk: ChangeLog src/com/ecyrd/jspwiki/Release.java src/com/ecyrd/jspwiki/WikiEngine.java

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Isn't this a problem if someones base path ends with a non-slash  
thing?  For example, "http://myorg/myredirectservlet?redirurl="

Better to fix in the installer?

/Janne


> --- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java  
> (original)
> +++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java  
> Wed Nov 12 12:24:43 2008
> @@ -498,7 +498,11 @@
>                                                           
> m_saveUserInfo );
>
>          m_useUTF8        = "UTF-8".equals 
> ( TextUtil.getStringProperty( props, PROP_ENCODING, "ISO-8859-1" ) );
> -        m_baseURL        = TextUtil.getStringProperty( props,  
> PROP_BASEURL, "" );
> +        m_baseURL = TextUtil.getStringProperty( props,  
> PROP_BASEURL, "" );
> +        if( !m_baseURL.endsWith( "/" ) )
> +        {
> +            m_baseURL = m_baseURL + "/";
> +        }
>
>
>          m_beautifyTitle  = TextUtil.getBooleanProperty( props,
>