mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-08 19:22:29 +00:00
* Added support for named pipes and proper parseing of arguments for
SCGI. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@906 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -96,7 +96,10 @@ SCgiTask::event_read() {
|
||||
// Don't bother caching the parsed values, as we're likely to
|
||||
// receive all the data we need the first time.
|
||||
char* current;
|
||||
char* contentPos;
|
||||
|
||||
int headerSize = strtol(m_buffer, ¤t, 0);
|
||||
int contentSize;
|
||||
|
||||
if (current == m_buffer || current == m_position)
|
||||
// Need to validate the header size.
|
||||
@@ -111,8 +114,7 @@ SCgiTask::event_read() {
|
||||
if (std::memcmp(current, "CONTENT_LENGTH", 15) != 0)
|
||||
goto event_read_failed;
|
||||
|
||||
char* contentPos;
|
||||
int contentSize = strtol(current + 15, &contentPos, 0);
|
||||
contentSize = strtol(current + 15, &contentPos, 0);
|
||||
|
||||
if (*contentPos != '\0' || contentSize <= 0)
|
||||
goto event_read_failed;
|
||||
|
||||
Reference in New Issue
Block a user