Commit 518cee1f authored by Andreas Jung's avatar Andreas Jung

regex free

parent ecc1a831
...@@ -89,7 +89,7 @@ The HTTPResponse class takes care of server headers, response munging ...@@ -89,7 +89,7 @@ The HTTPResponse class takes care of server headers, response munging
and logging duties. and logging duties.
""" """
import time, regex, string, sys, tempfile import time, re, string, sys, tempfile
from cStringIO import StringIO from cStringIO import StringIO
import thread import thread
from ZPublisher.HTTPResponse import HTTPResponse from ZPublisher.HTTPResponse import HTTPResponse
...@@ -123,7 +123,7 @@ class ZServerHTTPResponse(HTTPResponse): ...@@ -123,7 +123,7 @@ class ZServerHTTPResponse(HTTPResponse):
_chunking=0 _chunking=0
def __str__(self, def __str__(self,
html_search=regex.compile('<html>',regex.casefold).search, html_search=re.compile('<html>',re.I).search,
): ):
if self._wrote: if self._wrote:
if self._chunking: if self._chunking:
......
...@@ -89,7 +89,7 @@ The HTTPResponse class takes care of server headers, response munging ...@@ -89,7 +89,7 @@ The HTTPResponse class takes care of server headers, response munging
and logging duties. and logging duties.
""" """
import time, regex, string, sys, tempfile import time, re, string, sys, tempfile
from cStringIO import StringIO from cStringIO import StringIO
import thread import thread
from ZPublisher.HTTPResponse import HTTPResponse from ZPublisher.HTTPResponse import HTTPResponse
...@@ -123,7 +123,7 @@ class ZServerHTTPResponse(HTTPResponse): ...@@ -123,7 +123,7 @@ class ZServerHTTPResponse(HTTPResponse):
_chunking=0 _chunking=0
def __str__(self, def __str__(self,
html_search=regex.compile('<html>',regex.casefold).search, html_search=re.compile('<html>',re.I).search,
): ):
if self._wrote: if self._wrote:
if self._chunking: if self._chunking:
......
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