Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d157aa80
Commit
d157aa80
authored
Jul 23, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid dependency between WSGIPublisher and ZServer.
parent
0bd4df83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/ZPublisher/WSGIPublisher.py
src/ZPublisher/WSGIPublisher.py
+9
-1
No files found.
src/ZPublisher/WSGIPublisher.py
View file @
d157aa80
...
...
@@ -22,7 +22,6 @@ from zExceptions import Unauthorized
from
zope.event
import
notify
from
zope.security.management
import
newInteraction
,
endInteraction
from
zope.publisher.skinnable
import
setDefaultSkin
from
ZServer.medusa.http_date
import
build_http_date
from
ZPublisher.HTTPRequest
import
HTTPRequest
from
ZPublisher.HTTPResponse
import
HTTPResponse
...
...
@@ -35,6 +34,9 @@ from ZPublisher.Publish import missing_name
from
ZPublisher.Iterators
import
IUnboundStreamIterator
,
IStreamIterator
_NOW
=
None
# overwrite for testing
MONTHNAME
=
[
None
,
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
]
WEEKDAYNAME
=
[
'Mon'
,
'Tue'
,
'Wed'
,
'Thu'
,
'Fri'
,
'Sat'
,
'Sun'
]
def
_now
():
...
...
@@ -43,6 +45,12 @@ def _now():
return
time
.
time
()
def
build_http_date
(
when
):
year
,
month
,
day
,
hh
,
mm
,
ss
,
wd
,
y
,
z
=
time
.
gmtime
(
when
)
return
"%s, %02d %3s %4d %02d:%02d:%02d GMT"
%
(
WEEKDAYNAME
[
wd
],
day
,
MONTHNAME
[
month
],
year
,
hh
,
mm
,
ss
)
class
WSGIResponse
(
HTTPResponse
):
"""A response object for WSGI
...
...
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