Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Lib/nntplib.py

    r2 r388  
    3737           "error_reply","error_temp","error_perm","error_proto",
    3838           "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
    3946
    4047# Exceptions raised when an error or invalid response is received
     
    104111        readermode is sometimes necessary if you are connecting to an
    105112        NNTP server on the local machine and intend to call
    106         reader-specific comamnds, such as `group'.  If you get
     113        reader-specific commands, such as `group'.  If you get
    107114        unexpected NNTPPermanentErrors, you might need to set
    108115        readermode.
     
    201208        """Internal: return one line from the server, stripping CRLF.
    202209        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')
    204213        if self.debugging > 1:
    205214            print '*get*', repr(line)
Note: See TracChangeset for help on using the changeset viewer.