Menu

#41 QueryStringSigner Resolves Path Incorrectly

open
nobody
None
5
2010-05-15
2010-05-15
No

The QueryStringSigner generates that path to sign via the code:

String uri = endpoint.getPath();
if (uri == null || uri.length() == 0) {
uri = "/";
}

However, the path used to make a request in HttpClient is generated as follows:

if (request.getResourcePath() != null && request.getResourcePath().length() > 0) {
if (request.getResourcePath().startsWith("/") == false) {
uri += "/";
}
uri += request.getResourcePath();
}

It would seem that one of these two is incorrect. I believe it is the first. The only workaround is to never use resourcePath and always embed the path into a fully qualified enpoint URI.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.