Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
36cbc08f
Commit
36cbc08f
authored
Nov 12, 2006
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #1359217: Ignore 2xx response before 150 response.
Will backport to 2.5.
parent
056dac1b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
Lib/ftplib.py
Lib/ftplib.py
+11
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/ftplib.py
View file @
36cbc08f
...
...
@@ -325,6 +325,14 @@ class FTP:
if
rest
is
not
None
:
self
.
sendcmd
(
"REST %s"
%
rest
)
resp
=
self
.
sendcmd
(
cmd
)
# Some servers apparently send a 200 reply to
# a LIST or STOR command, before the 150 reply
# (and way before the 226 reply). This seems to
# be in violation of the protocol (which only allows
# 1xx or error messages for LIST), so we just discard
# this response.
if
resp
[
0
]
==
'2'
:
resp
=
self
.
getresp
()
if
resp
[
0
]
!=
'1'
:
raise
error_reply
,
resp
else
:
...
...
@@ -332,6 +340,9 @@ class FTP:
if
rest
is
not
None
:
self
.
sendcmd
(
"REST %s"
%
rest
)
resp
=
self
.
sendcmd
(
cmd
)
# See above.
if
resp
[
0
]
==
'2'
:
resp
=
self
.
getresp
()
if
resp
[
0
]
!=
'1'
:
raise
error_reply
,
resp
conn
,
sockaddr
=
sock
.
accept
()
...
...
Misc/NEWS
View file @
36cbc08f
...
...
@@ -98,6 +98,9 @@ Core and builtins
Library
-------
- Patch #1359217: Process 2xx response in an ftplib transfer
that precedes an 1xx response.
- Patch #1355023: support whence argument for GzipFile.seek.
- Patch #1065257: Support passing open files as body in
...
...
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