Changeset 23e807a144fa1f89d334518ea4a32eacfe154008
- Timestamp:
- 10/31/11 18:02:54
(2 years ago)
- Author:
- Ryan Phillips <ryan.phillips@rackspace.com>
- git-committer:
- Ryan Phillips <ryan.phillips@rackspace.com> 1320084174 -0500
- git-parent:
[201e9d3d678bc8669cead70a8c52df2da7aa0585]
- git-author:
- Ryan Phillips <ryan.phillips@rackspace.com> 1319741201 -0500
- Message:
check for valid read_limit
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r09fef40 |
r23e807a |
|
| 132 | 132 | function te_length(self, content_enc_func, read_limit) |
|---|
| 133 | 133 | local len = tonumber(self.headers["content-length"]) |
|---|
| 134 | | if read_limit > 0 and len > read_limit then |
|---|
| | 134 | if read_limit and read_limit > 0 and len > read_limit then |
|---|
| 135 | 135 | len = read_limit |
|---|
| 136 | 136 | end |
|---|
| … | … | |
| 164 | 164 | self.content_bytes = self.content_bytes + string.len(decoded) |
|---|
| 165 | 165 | if self.hooks.consume ~= nil then self.hooks.consume(decoded) end |
|---|
| 166 | | if read_limit > 0 then |
|---|
| | 166 | if read_limit and read_limit > 0 then |
|---|
| 167 | 167 | if string.len(self.content_bytes) > read_limit then |
|---|
| 168 | 168 | return |
|---|