[OpenSRF-GIT] OpenSRF branch rel_2_4 updated. osrf_rel_2_4_0-29-gd6b1c12
Evergreen Git
git at git.evergreen-ils.org
Fri Jun 19 14:57:08 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenSRF".
The branch, rel_2_4 has been updated
via d6b1c12ee60f70601bba44426e03ad851513dbfd (commit)
via d435f958a63a9220a6b12c3329b4cea1311cede9 (commit)
from 530220a8524bed925dacf63a92c6d8a7e4ca7652 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d6b1c12ee60f70601bba44426e03ad851513dbfd
Author: Dan Scott <dscott at laurentian.ca>
Date: Thu Jun 18 11:52:00 2015 -0400
LP#1409055 Support specific protocols for OpenSRF gateway requests
If the user passes in a gateway hostname that contains a specific HTTP or HTTPS
protocol, let's just use that.
Signed-off-by: Dan Scott <dscott at laurentian.ca>
Signed-off-by: Bill Erickson <berickxx at gmail.com>
diff --git a/src/python/osrf/gateway.py b/src/python/osrf/gateway.py
index eda1139..8796ce2 100644
--- a/src/python/osrf/gateway.py
+++ b/src/python/osrf/gateway.py
@@ -50,6 +50,18 @@ class GatewayRequest:
setDefaultHost = staticmethod(setDefaultHost)
def buildURL(self):
+ """
+ Builds the URL for the OpenSRF gateway based on the host and path
+
+ Previous versions of the code assumed that the host would be a bare
+ hostname or IP address, and prepended the http:// protocol. However,
+ to enable more secure communications, now we check for the existence
+ of the HTTP or HTTPS prefix and use that if it has been supplied.
+ """
+
+ if defaultHost.lower().startswith(('http://', 'https://')):
+ return '%s/%s' % (defaultHost, self.path)
+
return 'http://%s/%s' % (defaultHost, self.path)
class JSONGatewayRequest(GatewayRequest):
commit d435f958a63a9220a6b12c3329b4cea1311cede9
Author: Dan Scott <dscott at laurentian.ca>
Date: Fri Jun 19 14:55:48 2015 -0400
Revert "Merge remote-tracking branch 'working/user/berick/lp1409055-python-https-via-dbs' into https_is_good_24"
This reverts commit 530220a8524bed925dacf63a92c6d8a7e4ca7652, reversing
changes made to a8ea7468ed180c7c4cc2da3511a61949312ee5bf.
diff --git a/src/python/osrf/gateway.py b/src/python/osrf/gateway.py
index 8796ce2..eda1139 100644
--- a/src/python/osrf/gateway.py
+++ b/src/python/osrf/gateway.py
@@ -50,18 +50,6 @@ class GatewayRequest:
setDefaultHost = staticmethod(setDefaultHost)
def buildURL(self):
- """
- Builds the URL for the OpenSRF gateway based on the host and path
-
- Previous versions of the code assumed that the host would be a bare
- hostname or IP address, and prepended the http:// protocol. However,
- to enable more secure communications, now we check for the existence
- of the HTTP or HTTPS prefix and use that if it has been supplied.
- """
-
- if defaultHost.lower().startswith(('http://', 'https://')):
- return '%s/%s' % (defaultHost, self.path)
-
return 'http://%s/%s' % (defaultHost, self.path)
class JSONGatewayRequest(GatewayRequest):
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
OpenSRF
More information about the opensrf-commits
mailing list