Loading lib/transfer.c +6 −8 Original line number Diff line number Diff line Loading @@ -797,13 +797,9 @@ Transfer(struct connectdata *c_conn) if((keepon & KEEP_WRITE) && FD_ISSET(conn->writesockfd, &writefd)) { /* write */ char scratch[BUFSIZE * 2]; int i, si; size_t bytes_written; if(data->set.crlf) buf = data->state.buffer; /* put it back on the buffer */ nread = data->set.fread(buf, 1, conn->upload_bufsize, data->set.in); /* the signed int typecase of nread of for systems that has Loading @@ -821,15 +817,15 @@ Transfer(struct connectdata *c_conn) if (data->set.crlf) { for(i = 0, si = 0; i < (int)nread; i++, si++) { if (buf[i] == 0x0a) { scratch[si++] = 0x0d; scratch[si] = 0x0a; data->state.scratch[si++] = 0x0d; data->state.scratch[si] = 0x0a; } else { scratch[si] = buf[i]; data->state.scratch[si] = buf[i]; } } nread = si; buf = scratch; /* point to the new buffer */ buf = data->state.scratch; /* point to the new buffer */ } /* write to socket */ Loading @@ -840,6 +836,8 @@ Transfer(struct connectdata *c_conn) failf(data, "Failed uploading data"); return CURLE_WRITE_ERROR; } if(data->set.crlf) buf = data->state.buffer; /* put it back on the buffer */ } Loading lib/urldata.h +2 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,8 @@ struct UrlState { struct curl_ssl_session *session; /* array of 'numsessions' size */ long sessionage; /* number of the most recent session */ char scratch[BUFSIZE*2]; /* huge buffer when doing upload CRLF replacing */ }; Loading Loading
lib/transfer.c +6 −8 Original line number Diff line number Diff line Loading @@ -797,13 +797,9 @@ Transfer(struct connectdata *c_conn) if((keepon & KEEP_WRITE) && FD_ISSET(conn->writesockfd, &writefd)) { /* write */ char scratch[BUFSIZE * 2]; int i, si; size_t bytes_written; if(data->set.crlf) buf = data->state.buffer; /* put it back on the buffer */ nread = data->set.fread(buf, 1, conn->upload_bufsize, data->set.in); /* the signed int typecase of nread of for systems that has Loading @@ -821,15 +817,15 @@ Transfer(struct connectdata *c_conn) if (data->set.crlf) { for(i = 0, si = 0; i < (int)nread; i++, si++) { if (buf[i] == 0x0a) { scratch[si++] = 0x0d; scratch[si] = 0x0a; data->state.scratch[si++] = 0x0d; data->state.scratch[si] = 0x0a; } else { scratch[si] = buf[i]; data->state.scratch[si] = buf[i]; } } nread = si; buf = scratch; /* point to the new buffer */ buf = data->state.scratch; /* point to the new buffer */ } /* write to socket */ Loading @@ -840,6 +836,8 @@ Transfer(struct connectdata *c_conn) failf(data, "Failed uploading data"); return CURLE_WRITE_ERROR; } if(data->set.crlf) buf = data->state.buffer; /* put it back on the buffer */ } Loading
lib/urldata.h +2 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,8 @@ struct UrlState { struct curl_ssl_session *session; /* array of 'numsessions' size */ long sessionage; /* number of the most recent session */ char scratch[BUFSIZE*2]; /* huge buffer when doing upload CRLF replacing */ }; Loading