mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:53:33 +03:00
hostname and large file support added
This commit is contained in:
parent
31b8eea041
commit
1b1f143cd6
9 changed files with 123 additions and 14 deletions
20
lib/sendf.c
20
lib/sendf.c
|
|
@ -84,7 +84,6 @@ void failf(struct UrlData *data, char *fmt, ...)
|
|||
}
|
||||
|
||||
/* sendf() sends the formated data to the server */
|
||||
|
||||
int sendf(int fd, struct UrlData *data, char *fmt, ...)
|
||||
{
|
||||
size_t bytes_written;
|
||||
|
|
@ -110,6 +109,25 @@ int sendf(int fd, struct UrlData *data, char *fmt, ...)
|
|||
return(bytes_written);
|
||||
}
|
||||
|
||||
/* ssend() sends plain (binary) data to the server */
|
||||
size_t ssend(int fd, struct UrlData *data, void *mem, size_t len)
|
||||
{
|
||||
size_t bytes_written;
|
||||
|
||||
if(data->bits.verbose)
|
||||
fprintf(data->err, "> [binary output]\n");
|
||||
#ifndef USE_SSLEAY
|
||||
bytes_written = swrite(fd, mem, len);
|
||||
#else
|
||||
if (data->use_ssl) {
|
||||
bytes_written = SSL_write(data->ssl, mem, len);
|
||||
} else {
|
||||
bytes_written = swrite(fd, mem, len);
|
||||
}
|
||||
#endif /* USE_SSLEAY */
|
||||
return bytes_written;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue