Project

General

Profile

« Previous | Next » 

Revision 4421

use secure server for replication - note that this is WITHOUT "https://" prepended

View differences:

src/edu/ucsb/nceas/metacat/util/SystemUtil.java
126 126
	 * @return string holding the server URL
127 127
	 */
128 128
	public static String getSecureServerURL() throws PropertyNotFoundException {
129
		String ServerURL = "https://" + PropertyService.getProperty("server.name");
129
		String ServerURL = "https://" + getSecureServer();
130
		return ServerURL;
131
	}
132
	
133
	/**
134
	 * Get the secure server  which is made up of the server name + : + the
135
	 * https port number. Note that if the port is 443, it is left off.
136
	 * NOTE: does NOT include "https://"
137
	 * @see getSecureServerURL()
138
	 * 
139
	 * @return string holding the secure server
140
	 */
141
	public static String getSecureServer() throws PropertyNotFoundException {
142
		String server = PropertyService.getProperty("server.name");
130 143
		String httpPort = PropertyService.getProperty("server.httpSSLPort");
131 144
		if (!httpPort.equals("443")) {
132
			ServerURL = PropertyService.getProperty("server.name") + ":" + httpPort;
145
			server = server + ":" + httpPort;
133 146
		}
134 147

  
135
		return ServerURL;
148
		return server;
136 149
	}
137 150

  
138 151
	/**
src/edu/ucsb/nceas/metacat/util/MetaCatUtil.java
603 603
        // append "context/servlet/replication" to the host name
604 604
        try {
605 605
        replicationServerName = 
606
        	SystemUtil.getContextURL() + "/servlet/replication";
606
        	SystemUtil.getSecureServer() + "/servlet/replication";
607 607
        } catch (PropertyNotFoundException pnfe) {
608 608
        	logMetacat.error("Could not get local replication server name " 
609 609
        			+ "because property could not be found: " + pnfe.getMessage());

Also available in: Unified diff