Project

General

Profile

« Previous | Next » 

Revision 6050

Use SystemUtil.getContextURL() in ResourceHandler to construct the DataONE service URL (rather than direct calls to PropertyService). This handles http and https URLs, and strips the :80 or :443 for the well known ports.

View differences:

src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
75 75
import edu.ucsb.nceas.metacat.properties.PropertyService;
76 76
import edu.ucsb.nceas.metacat.service.SessionService;
77 77
import edu.ucsb.nceas.metacat.util.RequestUtil;
78
import edu.ucsb.nceas.metacat.util.SystemUtil;
78 79
import edu.ucsb.nceas.metacat.util.SessionData;
79 80
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
80 81

  
......
744 745
        {
745 746
            nodeId = PropertyService.getProperty("dataone.memberNodeId");
746 747
            nodeName = PropertyService.getProperty("dataone.nodeName");
747
            nodeUrl = PropertyService.getProperty("dataone.memberNodeId") + "/" +
748
                PropertyService.getProperty("application.context") + "/d1/";
748
            nodeUrl = SystemUtil.getContextURL() + "/d1/";
749 749
            nodeDesc = PropertyService.getProperty("dataone.nodeDescription");
750 750
            nodeType = PropertyService.getProperty("dataone.nodeType");
751 751
        }

Also available in: Unified diff