Update of /cvsroot/archive-access/archive-access/projects/wayback/src/java/org/archive/wayback/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10314/src/java/org/archive/wayback/core
Modified Files:
WMRequest.java
Log Message:
BUGFIX: was not correctly parsing CGI Queries where url had no trailing '/'
Index: WMRequest.java
===================================================================
RCS file: /cvsroot/archive-access/archive-access/projects/wayback/src/java/org/archive/wayback/core/WMRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WMRequest.java 20 Oct 2005 00:40:41 -0000 1.3
--- WMRequest.java 26 Oct 2005 01:10:00 -0000 1.4
***************
*** 269,275 ****
}
parseCGIArgsDates(queryMap);
! if (!requestURIStr.startsWith("http://")) {
requestURIStr = "http://" + requestURIStr;
}
requestURI = new UURI(requestURIStr,false);
setRetrieval();
--- 269,283 ----
}
parseCGIArgsDates(queryMap);
! if (requestURIStr.startsWith("http://")) {
! if(-1 == requestURIStr.indexOf('/',8)) {
! requestURIStr = requestURIStr + "/";
! }
! } else {
! if (!requestURIStr.contains("/")) {
! requestURIStr = requestURIStr + "/";
! }
requestURIStr = "http://" + requestURIStr;
}
+
requestURI = new UURI(requestURIStr,false);
setRetrieval();
***************
*** 302,306 ****
}
parseCGIArgsDates(queryMap);
! if (!requestURIStr.startsWith("http://")) {
requestURIStr = "http://" + requestURIStr;
}
--- 310,321 ----
}
parseCGIArgsDates(queryMap);
! if (requestURIStr.startsWith("http://")) {
! if(-1 == requestURIStr.indexOf('/',8)) {
! requestURIStr = requestURIStr + "/";
! }
! } else {
! if (!requestURIStr.contains("/")) {
! requestURIStr = requestURIStr + "/";
! }
requestURIStr = "http://" + requestURIStr;
}
***************
*** 358,362 ****
// the latest possible:
if(origExactDateRequest == null) {
! endTimestamp = Timestamp.latestTimestamp();
} else {
// no end specified, but they asked for an exact date.
--- 373,377 ----
// the latest possible:
if(origExactDateRequest == null) {
! endTimestamp = Timestamp.currentTimestamp();
} else {
// no end specified, but they asked for an exact date.
***************
*** 365,369 ****
if(origExactDateRequest.equals(exactTimestamp.getDateStr())) {
! endTimestamp = Timestamp.latestTimestamp();
} else {
endTimestamp = Timestamp.parseAfter(exactDateRequest);
--- 380,384 ----
if(origExactDateRequest.equals(exactTimestamp.getDateStr())) {
! endTimestamp = Timestamp.currentTimestamp();
} else {
endTimestamp = Timestamp.parseAfter(exactDateRequest);
|