- Timestamp:
- 2002-06-25T11:45:14+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/java/org/nzdl/gsdl/Phind/Phind.java
r2789 r3178 492 492 String tidy_URL(String address, boolean isCGI) { 493 493 494 // System. out.println("tidy URL: " + address);494 // System.err.println("tidy URL: " + address); 495 495 496 496 // make sure the URL has protocol, host, and file … … 500 500 // there is not protocol and host 501 501 URL document = getDocumentBase(); 502 address = "http://" + document.getHost() + ":" + document.getPort() + address; 502 String port = ""; 503 if (document.getPort()!=-1) { 504 port = ":" + document.getPort(); 505 } 506 address = "http://" + document.getHost() + port + address; 503 507 } else { 504 508 // this URL is relative to the directory the document is in … … 506 510 String directory = document.getFile(); 507 511 int end = directory.lastIndexOf('/'); 512 String port = ""; 513 if (document.getPort()!=-1) { 514 port = ":" + document.getPort(); 515 } 508 516 directory = directory.substring(0,end + 1); 509 address = "http://" + document.getHost() + ":" + document.getPort()+ directory + address;517 address = "http://" + document.getHost() + port + directory + address; 510 518 511 519 }
Note:
See TracChangeset
for help on using the changeset viewer.