Commit 6786b136 authored by Andreas Jung's avatar Andreas Jung

Changes for new Medusa release

parent deadcb1a
......@@ -117,10 +117,11 @@ from PubCore import handle
from HTTPResponse import make_response
from ZPublisher.HTTPRequest import HTTPRequest
from medusa.http_server import http_server, http_channel, VERSION_STRING
from medusa.http_server import http_server,get_header, http_channel, VERSION_STRING
import asyncore
from medusa import counter, producers, max_sockets
from medusa.default_handler import split_path, unquote, get_header
from medusa import counter, producers
from medusa.test import max_sockets
from medusa.default_handler import unquote
from asyncore import compact_traceback, dispatcher
from ZServer import CONNECTION_LIMIT, ZOPE_VERSION, ZSERVER_VERSION
......@@ -142,13 +143,6 @@ header2env={'content-length' : 'CONTENT_LENGTH',
}
# stolen from Medusa
def get_header (head_reg, lines, group=1):
for line in lines:
if head_reg.match (line):
return head_reg.group(group)
return ''
class zhttp_collector:
def __init__(self, handler, request, size):
self.handler = handler
......@@ -243,7 +237,9 @@ class zhttp_handler:
workdir=os.getcwd(),
ospath=os.path,
):
[path, params, query, fragment] = split_path(request.uri)
(path, params, query, fragment) = request.split_uri()
while path and path[0] == '/':
path = path[1:]
if '%' in path:
......
......@@ -86,6 +86,6 @@
"""Simple Event Manager Based on Pipes
"""
from ZServer.medusa.select_trigger import trigger
from ZServer.medusa.thread.select_trigger import trigger
Wakeup=trigger().pull_trigger
......@@ -117,10 +117,11 @@ from PubCore import handle
from HTTPResponse import make_response
from ZPublisher.HTTPRequest import HTTPRequest
from medusa.http_server import http_server, http_channel, VERSION_STRING
from medusa.http_server import http_server,get_header, http_channel, VERSION_STRING
import asyncore
from medusa import counter, producers, max_sockets
from medusa.default_handler import split_path, unquote, get_header
from medusa import counter, producers
from medusa.test import max_sockets
from medusa.default_handler import unquote
from asyncore import compact_traceback, dispatcher
from ZServer import CONNECTION_LIMIT, ZOPE_VERSION, ZSERVER_VERSION
......@@ -142,13 +143,6 @@ header2env={'content-length' : 'CONTENT_LENGTH',
}
# stolen from Medusa
def get_header (head_reg, lines, group=1):
for line in lines:
if head_reg.match (line):
return head_reg.group(group)
return ''
class zhttp_collector:
def __init__(self, handler, request, size):
self.handler = handler
......@@ -243,7 +237,9 @@ class zhttp_handler:
workdir=os.getcwd(),
ospath=os.path,
):
[path, params, query, fragment] = split_path(request.uri)
(path, params, query, fragment) = request.split_uri()
while path and path[0] == '/':
path = path[1:]
if '%' in path:
......
......@@ -86,6 +86,6 @@
"""Simple Event Manager Based on Pipes
"""
from ZServer.medusa.select_trigger import trigger
from ZServer.medusa.thread.select_trigger import trigger
Wakeup=trigger().pull_trigger
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment