Changeset 7723


Ignore:
Timestamp:
Jun 4, 2019, 1:58:03 PM (2 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2179: HTTP Status 400 - Bad request when logging in

Should be fixed now. There was an existing method that was already used when using the "view file" function. For some reason the "download file" function was not using the same.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.15-stable/www/filemanager/files/download_file.jsp

    r6308 r7723  
    3131  import="net.sf.basedb.core.Permission"
    3232  import="net.sf.basedb.core.File"
     33  import="net.sf.basedb.core.Path"
    3334  import="net.sf.basedb.core.Location"
    3435  import="net.sf.basedb.core.User"
     
    6162{
    6263  File file = File.getById(dc, itemId);
    63   String path = file.getPath().toString();
     64  Path path = file.getPath();
    6465  String title = "Download " + path;
    6566 
     
    7071  }
    7172 
    72   String downloadUrl = root + "filemanager/files/download/-"+ID+"-"+HTML.urlEncode(path);
     73  String downloadUrl = root + "filemanager/files/download/-"+ID+"-"+path.toURLString("UTF-8");
    7374  %>
    7475  <base:page type="popup" title="<%=title%>">
     
    8586      <tr>
    8687        <th>File</th>
    87         <td><a href="<%=downloadUrl%>"><%=HTML.encodeTags(path)%></a></td>
     88        <td><a href="<%=downloadUrl%>"><%=HTML.encodeTags(path.toString())%></a></td>
    8889      </tr>
    8990      <tr>
Note: See TracChangeset for help on using the changeset viewer.