Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
76aa608b
Commit
76aa608b
authored
Dec 20, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_ui_test] Do not use HTTPSConnection over http
parent
0d55282a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
bt5/erp5_web_ui_test/TestTemplateItem/portal_components/test.erp5.testStaticWebSiteRedirection.py
...rtal_components/test.erp5.testStaticWebSiteRedirection.py
+5
-2
No files found.
bt5/erp5_web_ui_test/TestTemplateItem/portal_components/test.erp5.testStaticWebSiteRedirection.py
View file @
76aa608b
...
@@ -108,9 +108,12 @@ class TestStaticWebSectionRedirection(ERP5TypeTestCase):
...
@@ -108,9 +108,12 @@ class TestStaticWebSectionRedirection(ERP5TypeTestCase):
# '%s://%s/VirtualHostBase/http/example.org:1234/erp5/web_site_module/VirtualHostRoot/%s/%s' % (api_scheme, api_netloc, website.getId(), source_path)
# '%s://%s/VirtualHostBase/http/example.org:1234/erp5/web_site_module/VirtualHostRoot/%s/%s' % (api_scheme, api_netloc, website.getId(), source_path)
]:
]:
_
,
netloc_to_check
,
_
,
_
,
_
=
urlparse
.
urlsplit
(
url_to_check
)
scheme_to_check
,
netloc_to_check
,
_
,
_
,
_
=
urlparse
.
urlsplit
(
url_to_check
)
if
(
scheme_to_check
==
'https'
):
connection
=
httplib
.
HTTPSConnection
(
netloc_to_check
,
context
=
ssl
.
_create_unverified_context
(),
timeout
=
10
)
connection
=
httplib
.
HTTPSConnection
(
netloc_to_check
,
context
=
ssl
.
_create_unverified_context
(),
timeout
=
10
)
else
:
connection
=
httplib
.
HTTPConnection
(
netloc_to_check
,
timeout
=
10
)
connection
.
request
(
connection
.
request
(
method
=
"GET"
,
method
=
"GET"
,
url
=
url_to_check
url
=
url_to_check
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment