private String generateSignatureBase(URL url, String httpMethod,
			List<QParameter> parameters, StringBuffer normalizedUrl,
			StringBuffer normalizedRequestParameters) {

		Collections.sort(parameters);

		normalizedUrl.append(url.getProtocol());
		normalizedUrl.append("://");
		normalizedUrl.append(url.getHost());
		if ((url.getProtocol().equals("http") || url.getProtocol().equals(
				"https"))
				&& url.getPort() != -1) {
			normalizedUrl.append(":");
			normalizedUrl.append(url.getPort());
		}
		normalizedUrl.append(url.getPath());
		normalizedRequestParameters.append(formEncodeParameters(parameters));

		StringBuffer signatureBase = new StringBuffer();
		signatureBase.append(httpMethod.toUpperCase());
		signatureBase.append("&");
		signatureBase.append(encode(normalizedUrl.toString()));
		signatureBase.append("&");
		signatureBase.append(encode(normalizedRequestParameters.toString()));

		return signatureBase.toString();
	}