diff options
author | Wolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de> | 2013-07-19 18:23:33 +0200 |
---|---|---|
committer | Wolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de> | 2013-07-19 18:23:33 +0200 |
commit | bdcfe9b02381784ecc06847e0df15585c6ad549a (patch) | |
tree | 2c53bea9b04a85bd4e29f171fd5c7e5a039be6f8 | |
parent | 1f958fc608ea5c468c04d27e0029ae298f920134 (diff) | |
download | litheweb-bdcfe9b02381784ecc06847e0df15585c6ad549a.tar.gz litheweb-bdcfe9b02381784ecc06847e0df15585c6ad549a.tar.bz2 |
multipart read EOD signalling fixed
-rw-r--r-- | picohttp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1206,12 +1206,16 @@ int picohttpMultipartRead( * Probably a lot of code would be shared with the ...Getch variant * and could be placed into a commonly used function. */ + if( mp->finished ) { + return -1; + } + int ch; size_t i; for(i = 0; i < len; i++) { if( 0 > (ch = picohttpMultipartGetch(mp)) ) { if( mp->finished ) - return 0; + return i; else return ch; } |