Merge
This commit is contained in:
@@ -1,3 +1,23 @@
|
|||||||
|
# Copyright (c) 2005-2006, Bob Ippolito
|
||||||
|
# Copyright (c) 2007, Linden Research, Inc.
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
# THE SOFTWARE.
|
||||||
|
|
||||||
from eventlet.api import Greenlet
|
from eventlet.api import Greenlet
|
||||||
|
|
||||||
class SwitchingToDeadGreenlet(Exception):
|
class SwitchingToDeadGreenlet(Exception):
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
import cgi
|
import cgi
|
||||||
import os
|
import os
|
||||||
from unittest import TestCase, main
|
from unittest import TestCase, main
|
||||||
@@ -309,6 +310,20 @@ class TestHttpd(TestCase):
|
|||||||
res = httpc.get("https://localhost:4202/foo")
|
res = httpc.get("https://localhost:4202/foo")
|
||||||
self.assertEquals(res, '')
|
self.assertEquals(res, '')
|
||||||
|
|
||||||
|
def test_013_empty_return(self):
|
||||||
|
from eventlet import httpc
|
||||||
|
def wsgi_app(environ, start_response):
|
||||||
|
start_response("200 OK", [])
|
||||||
|
return [""]
|
||||||
|
|
||||||
|
certificate_file = os.path.join(os.path.dirname(__file__), 'test_server.crt')
|
||||||
|
private_key_file = os.path.join(os.path.dirname(__file__), 'test_server.key')
|
||||||
|
sock = api.ssl_listener(('', 4202), certificate_file, private_key_file)
|
||||||
|
api.spawn(wsgi.server, sock, wsgi_app)
|
||||||
|
|
||||||
|
res = httpc.get("https://localhost:4202/foo")
|
||||||
|
self.assertEquals(res, '')
|
||||||
|
|
||||||
def test_014_chunked_post(self):
|
def test_014_chunked_post(self):
|
||||||
self.site.application = chunked_post
|
self.site.application = chunked_post
|
||||||
sock = api.connect_tcp(('127.0.0.1', 12346))
|
sock = api.connect_tcp(('127.0.0.1', 12346))
|
||||||
|
Reference in New Issue
Block a user