Changeset 33406 for main


Ignore:
Timestamp:
2019-08-13T12:17:13+12:00 (5 years ago)
Author:
kjdon
Message:

if there is a semicolon after the file name, it ends up in the URL that comes to URLFilter. We need to make sure we don't keep it when getting the file name out of the URL, as then the file name won't match the document main file, we pass it through (eg like it's a supporting image file), and the semicolon will be taken off by tomcat and the file delivered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/URLFilter.java

    r33387 r33406  
    453453   
    454454    String file_name = url.substring(url.lastIndexOf("/")+1);
    455 
    456    
     455    // if there is ;jsessionid=xxx in the request, it is still here at this stage!!!
     456    int semicol = file_name.indexOf(';');
     457    if(semicol != -1) {
     458      file_name = file_name.substring(0, semicol);
     459    }
    457460
    458461    // Query the MR with a request for the contains metadata for node "dir" - where dir is the assocfilepath
Note: See TracChangeset for help on using the changeset viewer.