} /* while there's buffer left and loop is requested */
if(error)
- return CURLE_READ_ERROR;
+ return CURLE_RECV_ERROR;
if(200 != httperror) {
if(407 == httperror)
failf(data, "Proxy requires authorization!");
else
failf(data, "Received error code %d from proxy", httperror);
- return CURLE_READ_ERROR;
+ return CURLE_RECV_ERROR;
}
infof (data, "Proxy replied to CONNECT request\n");
}
/* a true error */
failf(conn->data, "SSL_write() return error %d\n", err);
- return CURLE_WRITE_ERROR;
+ return CURLE_SEND_ERROR;
}
bytes_written = rc;
}
#endif
*written = bytes_written;
- return (-1 != bytes_written)?CURLE_OK:CURLE_WRITE_ERROR;
+ return (-1 != bytes_written)?CURLE_OK:CURLE_SEND_ERROR;
}
/* client_write() sends data to the write callback(s)
break;
default:
failf(conn->data, "SSL read error: %d", err);
- return CURLE_READ_ERROR;
+ return CURLE_RECV_ERROR;
}
} while(loop);
if(loop && SSL_pending(conn->ssl.handle))
newbuff = (char *)realloc(data->state.headerbuff, newsize);
if(!newbuff) {
failf (data, "Failed to alloc memory for big header!");
- return CURLE_READ_ERROR;
+ return CURLE_OUT_OF_MEMORY;
}
data->state.headersize=newsize;
data->state.headerbuff = newbuff;
newbuff = (char *)realloc(data->state.headerbuff, newsize);
if(!newbuff) {
failf (data, "Failed to alloc memory for big header!");
- return CURLE_READ_ERROR;
+ return CURLE_OUT_OF_MEMORY;
}
data->state.headersize= newsize;
data->state.headerbuff = newbuff;
return CURLE_WRITE_ERROR;
}
failf(data, "Received problem in the chunky parser");
- return CURLE_READ_ERROR;
+ return CURLE_RECV_ERROR;
}
else if(CHUNKE_STOP == res) {
/* we're done reading chunks! */
break;
default:
/* unknown tag and its companion, just ignore: */
- return CURLE_READ_ERROR; /* correct this */
+ return CURLE_FAILED_INIT; /* correct this */
}
return CURLE_OK;
}
/* This was formerly done in transfer.c, but we better do it here */
- if((CURLE_WRITE_ERROR == result) && conn->bits.reuse) {
+ if((CURLE_SEND_ERROR == result) && conn->bits.reuse) {
/* This was a re-use of a connection and we got a write error in the
* DO-phase. Then we DISCONNECT this connection and have another attempt
* to CONNECT and then DO again! The retry cannot possibly find another