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
6ab4f9e8
Commit
6ab4f9e8
authored
Mar 27, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged fix for FTP error messages (bug # 1992)
parent
824e0e1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
ZServer/FTPResponse.py
ZServer/FTPResponse.py
+5
-0
ZServer/FTPServer.py
ZServer/FTPServer.py
+9
-4
lib/python/ZServer/FTPResponse.py
lib/python/ZServer/FTPResponse.py
+5
-0
lib/python/ZServer/FTPServer.py
lib/python/ZServer/FTPServer.py
+9
-4
No files found.
ZServer/FTPResponse.py
View file @
6ab4f9e8
...
...
@@ -120,6 +120,11 @@ class FTPResponse(ZServerHTTPResponse):
def
_marshalledBody
(
self
):
return
marshal
.
loads
(
self
.
body
)
def
setMessage
(
self
,
message
):
self
.
_message
=
message
def
getMessage
(
self
):
return
getattr
(
self
,
'_message'
,
''
)
class
CallbackPipe
:
"""
...
...
ZServer/FTPServer.py
View file @
6ab4f9e8
...
...
@@ -403,13 +403,18 @@ class zope_ftp_channel(ftp_channel):
handle
(
self
.
module
,
request
,
response
)
def
stor_completion
(
self
,
response
):
status
=
response
.
getStatus
()
status
=
response
.
getStatus
()
message
=
response
.
getMessage
()
if
status
in
(
200
,
201
,
204
,
302
):
self
.
client_dc
.
channel
.
respond
(
'226 Transfer complete.'
)
self
.
client_dc
.
channel
.
respond
(
'226 '
+
(
message
or
'Transfer complete.'
))
elif
status
==
401
:
self
.
client_dc
.
channel
.
respond
(
'426 Unauthorized.'
)
self
.
client_dc
.
channel
.
respond
(
'426 '
+
(
message
or
'Unauthorized.'
))
else
:
self
.
client_dc
.
channel
.
respond
(
'426 Error creating file.'
)
self
.
client_dc
.
channel
.
respond
(
'426 '
+
(
message
or
'Error creating file.'
))
self
.
client_dc
.
close
()
def
cmd_rnfr
(
self
,
line
):
...
...
lib/python/ZServer/FTPResponse.py
View file @
6ab4f9e8
...
...
@@ -120,6 +120,11 @@ class FTPResponse(ZServerHTTPResponse):
def
_marshalledBody
(
self
):
return
marshal
.
loads
(
self
.
body
)
def
setMessage
(
self
,
message
):
self
.
_message
=
message
def
getMessage
(
self
):
return
getattr
(
self
,
'_message'
,
''
)
class
CallbackPipe
:
"""
...
...
lib/python/ZServer/FTPServer.py
View file @
6ab4f9e8
...
...
@@ -403,13 +403,18 @@ class zope_ftp_channel(ftp_channel):
handle
(
self
.
module
,
request
,
response
)
def
stor_completion
(
self
,
response
):
status
=
response
.
getStatus
()
status
=
response
.
getStatus
()
message
=
response
.
getMessage
()
if
status
in
(
200
,
201
,
204
,
302
):
self
.
client_dc
.
channel
.
respond
(
'226 Transfer complete.'
)
self
.
client_dc
.
channel
.
respond
(
'226 '
+
(
message
or
'Transfer complete.'
))
elif
status
==
401
:
self
.
client_dc
.
channel
.
respond
(
'426 Unauthorized.'
)
self
.
client_dc
.
channel
.
respond
(
'426 '
+
(
message
or
'Unauthorized.'
))
else
:
self
.
client_dc
.
channel
.
respond
(
'426 Error creating file.'
)
self
.
client_dc
.
channel
.
respond
(
'426 '
+
(
message
or
'Error creating file.'
))
self
.
client_dc
.
close
()
def
cmd_rnfr
(
self
,
line
):
...
...
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