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
2fd740aa
Commit
2fd740aa
authored
Nov 15, 1999
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Synch Zope's medusa http and ftp modules with Sam's latest versions.
parent
5b536f7c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
20 deletions
+32
-20
ZServer/medusa/ftp_server.py
ZServer/medusa/ftp_server.py
+3
-9
ZServer/medusa/http_server.py
ZServer/medusa/http_server.py
+13
-1
lib/python/ZServer/medusa/ftp_server.py
lib/python/ZServer/medusa/ftp_server.py
+3
-9
lib/python/ZServer/medusa/http_server.py
lib/python/ZServer/medusa/http_server.py
+13
-1
No files found.
ZServer/medusa/ftp_server.py
View file @
2fd740aa
...
...
@@ -8,7 +8,7 @@
# If you are interested in using this software in a commercial context,
# or in purchasing support, please contact the author.
RCS_ID
=
'$Id: ftp_server.py,v 1.
7 1999/07/26 07:08:43
amos Exp $'
RCS_ID
=
'$Id: ftp_server.py,v 1.
8 1999/11/15 21:53:56
amos Exp $'
# An extensible, configurable, asynchronous FTP server.
#
...
...
@@ -174,6 +174,7 @@ class ftp_channel (asynchat.async_chat):
self
.
passive_acceptor
.
close
()
if
self
.
client_dc
:
self
.
client_dc
.
close
()
self
.
server
.
closed_sessions
.
increment
()
asynchat
.
async_chat
.
close
(
self
)
# --------------------------------------------------
...
...
@@ -335,13 +336,6 @@ class ftp_channel (asynchat.async_chat):
self
.
current_mode
=
t
self
.
respond
(
'200 Type set to %s.'
%
self
.
type_map
[
t
])
closed
=
0
def
close
(
self
):
if
not
self
.
closed
:
self
.
closed
=
1
asynchat
.
async_chat
.
close
(
self
)
self
.
server
.
closed_sessions
.
increment
()
def
cmd_quit
(
self
,
line
):
'terminate session'
self
.
respond
(
'221 Goodbye.'
)
...
...
@@ -857,7 +851,7 @@ class xmit_channel (asynchat.async_chat):
def
readable
(
self
):
return
0
def
handle_connect
(
self
):
def
log
(
self
,
*
args
):
pass
def
writable
(
self
):
...
...
ZServer/medusa/http_server.py
View file @
2fd740aa
...
...
@@ -9,7 +9,7 @@
# interested in using this software in a commercial context, or in
# purchasing support, please contact the author.
RCS_ID
=
'$Id: http_server.py,v 1.1
2 1999/09/22 22:06:42 petrilli
Exp $'
RCS_ID
=
'$Id: http_server.py,v 1.1
3 1999/11/15 21:53:56 amos
Exp $'
# python modules
import
os
...
...
@@ -448,6 +448,18 @@ class http_channel (asynchat.async_chat):
# --------------------------------------------------
# crack the request header
# --------------------------------------------------
while
lines
and
not
lines
[
0
]:
# as per the suggestion of http-1.1 section 4.1, (and
# Eric Parker <eparker@zyvex.com>), ignore a leading
# blank lines (buggy browsers tack it onto the end of
# POST requests)
lines
=
lines
[
1
:]
if
not
lines
:
self
.
close_when_done
()
return
request
=
lines
[
0
]
try
:
command
,
uri
,
version
=
crack_request
(
request
)
...
...
lib/python/ZServer/medusa/ftp_server.py
View file @
2fd740aa
...
...
@@ -8,7 +8,7 @@
# If you are interested in using this software in a commercial context,
# or in purchasing support, please contact the author.
RCS_ID
=
'$Id: ftp_server.py,v 1.
7 1999/07/26 07:08:43
amos Exp $'
RCS_ID
=
'$Id: ftp_server.py,v 1.
8 1999/11/15 21:53:56
amos Exp $'
# An extensible, configurable, asynchronous FTP server.
#
...
...
@@ -174,6 +174,7 @@ class ftp_channel (asynchat.async_chat):
self
.
passive_acceptor
.
close
()
if
self
.
client_dc
:
self
.
client_dc
.
close
()
self
.
server
.
closed_sessions
.
increment
()
asynchat
.
async_chat
.
close
(
self
)
# --------------------------------------------------
...
...
@@ -335,13 +336,6 @@ class ftp_channel (asynchat.async_chat):
self
.
current_mode
=
t
self
.
respond
(
'200 Type set to %s.'
%
self
.
type_map
[
t
])
closed
=
0
def
close
(
self
):
if
not
self
.
closed
:
self
.
closed
=
1
asynchat
.
async_chat
.
close
(
self
)
self
.
server
.
closed_sessions
.
increment
()
def
cmd_quit
(
self
,
line
):
'terminate session'
self
.
respond
(
'221 Goodbye.'
)
...
...
@@ -857,7 +851,7 @@ class xmit_channel (asynchat.async_chat):
def
readable
(
self
):
return
0
def
handle_connect
(
self
):
def
log
(
self
,
*
args
):
pass
def
writable
(
self
):
...
...
lib/python/ZServer/medusa/http_server.py
View file @
2fd740aa
...
...
@@ -9,7 +9,7 @@
# interested in using this software in a commercial context, or in
# purchasing support, please contact the author.
RCS_ID
=
'$Id: http_server.py,v 1.1
2 1999/09/22 22:06:42 petrilli
Exp $'
RCS_ID
=
'$Id: http_server.py,v 1.1
3 1999/11/15 21:53:56 amos
Exp $'
# python modules
import
os
...
...
@@ -448,6 +448,18 @@ class http_channel (asynchat.async_chat):
# --------------------------------------------------
# crack the request header
# --------------------------------------------------
while
lines
and
not
lines
[
0
]:
# as per the suggestion of http-1.1 section 4.1, (and
# Eric Parker <eparker@zyvex.com>), ignore a leading
# blank lines (buggy browsers tack it onto the end of
# POST requests)
lines
=
lines
[
1
:]
if
not
lines
:
self
.
close_when_done
()
return
request
=
lines
[
0
]
try
:
command
,
uri
,
version
=
crack_request
(
request
)
...
...
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