[ 
https://issues.apache.org/jira/browse/DISPATCH-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016087#comment-17016087
 ] 

ASF GitHub Bot commented on DISPATCH-1513:
------------------------------------------

kgiusti commented on pull request #660: DISPATCH-1513 - Fixed router crash when 
running http requests over ht…
URL: https://github.com/apache/qpid-dispatch/pull/660#discussion_r366918885
 
 

 ##########
 File path: cmake/FindLibWebSockets.cmake
 ##########
 @@ -60,6 +60,20 @@ else()
     LIBWEBSOCKETS DEFAULT_MSG LIBWEBSOCKETS_VERSION_STRING 
LIBWEBSOCKETS_LIBRARIES LIBWEBSOCKETS_INCLUDE_DIRS)
 endif()
 
+
+if (LIBWEBSOCKETS_FOUND)
+ # This is a fix for DISPATCH-1513. libwebsockets versions 3.2.0 introduces a 
new flag called LWS_SERVER_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER
+ # The new flag allows (as the flag says) HTTP pver HTTPS listeners. Since 
this flag is not available before lws 3.2.0 we need
+ # to selectively include the flag in http-libwebsockets.c
+ set(OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER "")
+ set(TEST_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER "#")
+ set(LWS_VERSION_WITH_SSL_FIX "3.2.0")
+ if (LIBWEBSOCKETS_VERSION_STRING AND (LIBWEBSOCKETS_VERSION_STRING 
VERSION_GREATER_EQUAL LWS_VERSION_WITH_SSL_FIX))
+   set(OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER "| 
LWS_SERVER_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER")
 
 Review comment:
   Can you instead check the libwebsockets version directly in 
http-libwebsockets.c?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> system_tests_http failing with libwebsockets 3.2 on Fedora 31
> -------------------------------------------------------------
>
>                 Key: DISPATCH-1513
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1513
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Ganesh Murthy
>            Assignee: Ganesh Murthy
>            Priority: Major
>             Fix For: 1.11.0
>
>
> Fedora 31 has the latest libwebsockets v 3.2.0 and system_tests_http is 
> failing -
> To reproduce
>  # cd qpid-dispatch/dockerfiles
>  # Open the file Dockerfile-fedora and comment out the line ENTRYPOINT 
> ["qdrouterd"]  and uncomment CMD ["/bin/bash"]. Save the file.
>  # sudo docker build -t fedora31/dispatch --file=Dockerfile-fedora .
>  # sudo docker run -i -t fedora31/dispatch
>  # cd /main/qpid-dispatch/build
>  # ctest -V -R system_tests_http. You will see the following error
> I am commenting out the failing test until the underlying problem is fixed.
> {noformat}
> [root@13552f9cbb69 build]# /usr/bin/python 
> "/main/qpid-dispatch/build/tests/run.py" "-m" "unittest" "-v" 
> "system_tests_http.RouterTestHttp.test_https_get"
> test_https_get (system_tests_http.RouterTestHttp) ... 
> /main/qpid-dispatch/tests/system_tests_http.py:54: DeprecationWarning: 
> cafile, capath and cadefault are deprecated, use a custom context instead.
>   http_data = urlopen(url, cafile=cls.ssl_file('ca-certificate.pem'))
> ERROR======================================================================
> ERROR: test_https_get (system_tests_http.RouterTestHttp)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/main/qpid-dispatch/tests/system_tests_http.py", line 252, in 
> test_https_get
>     self.assert_get("http://localhost:%s"; % r.ports[0])
>   File "/main/qpid-dispatch/tests/system_tests_http.py", line 83, in 
> assert_get
>     self.assertEqual(u'HTTP test\n', self.get("%s/system_tests_http.txt" % 
> url))
>   File "/main/qpid-dispatch/tests/system_tests_http.py", line 54, in get
>     http_data = urlopen(url, cafile=cls.ssl_file('ca-certificate.pem'))
>   File "/usr/lib64/python3.7/urllib/request.py", line 222, in urlopen
>     return opener.open(url, data, timeout)
>   File "/usr/lib64/python3.7/urllib/request.py", line 525, in open
>     response = self._open(req, data)
>   File "/usr/lib64/python3.7/urllib/request.py", line 543, in _open
>     '_open', req)
>   File "/usr/lib64/python3.7/urllib/request.py", line 503, in _call_chain
>     result = func(*args)
>   File "/usr/lib64/python3.7/urllib/request.py", line 1345, in http_open
>     return self.do_open(http.client.HTTPConnection, req)
>   File "/usr/lib64/python3.7/urllib/request.py", line 1320, in do_open
>     r = h.getresponse()
>   File "/usr/lib64/python3.7/http/client.py", line 1344, in getresponse
>     response.begin()
>   File "/usr/lib64/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/usr/lib64/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> http.client.RemoteDisconnected: Remote end closed connection without 
> response----------------------------------------------------------------------
> Ran 1 test in 0.164s  {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to