diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-08-18 00:04:52 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-08-18 00:04:52 +0000 |
commit | a393073c9c8a8ad765a3d4ae4483677792152d3a (patch) | |
tree | 8a3f0e06d17073f400da47c8955a979558454edd /uhttpd-tls.c | |
parent | 0bf05c0c6b9df2c91bdd6e51780e564568a5a282 (diff) | |
download | uhttpd-a393073c9c8a8ad765a3d4ae4483677792152d3a.tar.gz |
[package] uhttpd:
- fix parsing of interpreter entries in the config file, fixes serving of static files as .cgi with X-Wrt
- better cope with connection aborts, especially during header transfer
- fix return value checking of TLS reads and writes, solves some blocking issues
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@22692 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'uhttpd-tls.c')
-rw-r--r-- | uhttpd-tls.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/uhttpd-tls.c b/uhttpd-tls.c index 26143dd..008f8e0 100644 --- a/uhttpd-tls.c +++ b/uhttpd-tls.c @@ -70,12 +70,14 @@ void uh_tls_client_accept(struct client *c) int uh_tls_client_recv(struct client *c, void *buf, int len) { - return SSL_read(c->tls, buf, len); + int rv = SSL_read(c->tls, buf, len); + return (rv > 0) ? rv : -1; } int uh_tls_client_send(struct client *c, void *buf, int len) { - return SSL_write(c->tls, buf, len); + int rv = SSL_write(c->tls, buf, len); + return (rv > 0) ? rv : -1; } void uh_tls_client_close(struct client *c) |