Mercurial > prosody-hg
comparison net/http/parser.lua @ 4910:e5ec60dfb202
net.http.parser: Break loop when no more usable data in buffer
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 25 May 2012 02:32:33 +0100 |
| parents | 45bb378a4a98 |
| children | c5edb08fc7cb |
comparison
equal
deleted
inserted
replaced
| 4909:01bfb9a76660 | 4910:e5ec60dfb202 |
|---|---|
| 129 state = nil; success_cb(packet); | 129 state = nil; success_cb(packet); |
| 130 end | 130 end |
| 131 elseif #buf >= len then | 131 elseif #buf >= len then |
| 132 packet.body, buf = buf:sub(1, len), buf:sub(len + 1); | 132 packet.body, buf = buf:sub(1, len), buf:sub(len + 1); |
| 133 state = nil; success_cb(packet); | 133 state = nil; success_cb(packet); |
| 134 else | |
| 135 break; | |
| 134 end | 136 end |
| 135 end | 137 end |
| 136 end | 138 end |
| 137 end; | 139 end; |
| 138 }; | 140 }; |
