openid/src/main/java/org/springframework/security/openid/OpenIDAuthenticationFilter.java
protected String buildReturnToUrl(HttpServletRequest request) {
		StringBuffer sb = request.getRequestURL();

		Iterator<String> iterator = returnToUrlParameters.iterator();
		boolean isFirst = true;

		while (iterator.hasNext()) {
			String name = iterator.next();
			// Assume for simplicity that there is only one value
			String value = request.getParameter(name);

			if (value == null) {
				continue;
			}

			if (isFirst) {
				sb.append("?");
				isFirst = false;
			}
			sb.append(utf8UrlEncode(name)).append("=").append(utf8UrlEncode(value));

			if (iterator.hasNext()) {
				sb.append("&");
			}
		}
		return sb.toString();
	}
protected String buildReturnToUrl(HttpServletRequest request) {
		StringBuffer sb = request.getRequestURL();

		Iterator<String> iterator = returnToUrlParameters.iterator();
		boolean isFirst = true;

		while (iterator.hasNext()) {
			String name = iterator.next();
			// Assume for simplicity that there is only one value
			String value = request.getParameter(name);

			if (value == null) {
				continue;
			}

			if (isFirst) {
				sb.append("?");
				isFirst = false;
			}
			sb.append(utf8UrlEncode(name)).append("=").append(utf8UrlEncode(value));

			if (iterator.hasNext()) {
				sb.append("&");
			}
		}
		return sb.toString();
	}
Builds the <tt>return_to</tt> URL that will be sent to the OpenID service provider.
By default returns the URL of the current request.

@param request the current request which is being processed by this filter
@return The <tt>return_to</tt> URL.