Changeset 388 for python/vendor/current/Lib/nntplib.py
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Lib/nntplib.py
r2 r388 37 37 "error_reply","error_temp","error_perm","error_proto", 38 38 "error_data",] 39 40 # maximal line length when calling readline(). This is to prevent 41 # reading arbitrary length lines. RFC 3977 limits NNTP line length to 42 # 512 characters, including CRLF. We have selected 2048 just to be on 43 # the safe side. 44 _MAXLINE = 2048 45 39 46 40 47 # Exceptions raised when an error or invalid response is received … … 104 111 readermode is sometimes necessary if you are connecting to an 105 112 NNTP server on the local machine and intend to call 106 reader-specific com amnds, such as `group'. If you get113 reader-specific commands, such as `group'. If you get 107 114 unexpected NNTPPermanentErrors, you might need to set 108 115 readermode. … … 201 208 """Internal: return one line from the server, stripping CRLF. 202 209 Raise EOFError if the connection is closed.""" 203 line = self.file.readline() 210 line = self.file.readline(_MAXLINE + 1) 211 if len(line) > _MAXLINE: 212 raise NNTPDataError('line too long') 204 213 if self.debugging > 1: 205 214 print '*get*', repr(line)
Note:
See TracChangeset
for help on using the changeset viewer.