RE: Wt Upload file issue using FastCGI interface on Lighttpd ยป wt-3.2.1-buffer_len.patch
| wt-3.2.1/src/fcgi/FCGIRecord.h | ||
|---|---|---|
|
unsigned char type() const { return type_; }
|
||
|
unsigned char version() const { return version_; }
|
||
|
unsigned short requestId() const { return requestId_; }
|
||
|
unsigned short contentLength() const { return contentLength_; }
|
||
|
unsigned int contentLength() const { return contentLength_; }
|
||
|
const unsigned char *contentData() const { return contentData_; }
|
||
|
unsigned short plainTextLength() const { return plainTextLength_; }
|
||
|
unsigned int plainTextLength() const { return plainTextLength_; }
|
||
|
const unsigned char *plainText() const { return plainTextBuf_; }
|
||
|
void read(int fd);
|
||
| ... | ... | |
|
unsigned char version_;
|
||
|
unsigned char type_;
|
||
|
unsigned short requestId_;
|
||
|
unsigned short contentLength_;
|
||
|
unsigned int contentLength_;
|
||
|
unsigned char paddingLength_;
|
||
|
unsigned char reserved_;
|
||
|
unsigned char *contentData_;
|
||
|
unsigned short plainTextLength_;
|
||
|
unsigned int plainTextLength_;
|
||
|
unsigned char *plainTextBuf_;
|
||
|
unsigned short plainTextBufLength_;
|
||
|
unsigned int plainTextBufLength_;
|
||
|
int getChar(int fd, bool waitForIt);
|
||
|
bool getBuffer(int fd, unsigned char *buf, int length);
|
||
|
-- wt-3.2.1/src/fcgi/FCGIRecord.C.orig
|
||
|
++ wt-3.2.1/src/fcgi/FCGIRecord.C
|
||
| ... | ... | |
|
}
|
||
|
|
||
|
if (plainTextLength_ >= plainTextBufLength_) {
|
||
|
plainTextBufLength_ += 100;
|
||
|
plainTextBufLength_ += 1024;
|
||
|
plainTextBuf_ = (unsigned char *)
|
||
|
realloc(plainTextBuf_, plainTextBufLength_);
|
||
|
}
|
||
| ... | ... | |
|
if (plainTextLength_ + length > plainTextBufLength_) {
|
||
|
plainTextBufLength_ += length;
|
||
|
plainTextBufLength_ = (plainTextBufLength_ + 8) / 8 * 8;
|
||
|
plainTextBuf_ = (unsigned char *)
|
||
|
realloc(plainTextBuf_, plainTextBufLength_);
|
||
|
}
|
||