Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
2.0.0
-
None
Description
When creating an URL with "public String toString(PortalURL portalURL)" an unnecessary "?" is added if the query is empty (org.apache.pluto.driver.url.impl.PortalURLParserImpl).
This is the part of the source code where the URL is finally composed:
—
// Construct the string representing the portal URL.
// Fix for PLUTO-247 - check if query string contains parameters
if ( query.length() > 1 )
// Construct the string representing the portal URL.
return buffer.append(query).toString();
—
There was already a fix for this issue (PLUTO-247). May be this reappeared after some refactoring. The statement in the if-block and the one behind the if-block is the same.
The unnecessary "?" caused problems when using the URL as action in a form within a HTTPUnit-Test because the testframework does not look at the final character of the URL and adds an additional "?".