Changeset 16810

Show
Ignore:
Timestamp:
15.08.2008 13:50:46 (11 years ago)
Author:
ak19
Message:

GDBMWrapper converts the key string to UTF8 now before doing the lookup. The href_url key is no longer URLencoded by HTMLPlugin, which means it is in UTF8. Therefore getHrefOID() here does not need to do any corresponding URL encoding of the key for the database lookup either.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/gsdl3/service/AbstractGS2DocumentRetrieve.java

    r16798 r16810  
    496496 
    497497    protected String getHrefOID(String href_url){ 
    498     // URL encode the href_url since that's how the href key is stored in the database 
    499     try { 
    500         // URLEncoder encodes spaces as + instead of %20, but the key will be %20 
    501         href_url = java.net.URLEncoder.encode(href_url, "UTF8"); 
    502         href_url = href_url.replace("+", "%20"); 
    503     }catch(Exception e) { 
    504         logger.warn("Tried to encode href_url into URL but failed with: " + e.getMessage()); 
    505     } 
    506      
    507498        return this.coll_db.docnum2OID(href_url); 
    508499    }