1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00

smb: abort connection on empty files.

Empty files were causing 'read from socket' errors.

[ This is half of commit eef1c17dce
  from the witekfl branch.  The FSP half will come later.  --KON ]
This commit is contained in:
Witold Filipczyk 2007-01-25 13:38:32 +01:00 committed by Kalle Olavi Niemitalo
parent f70196dde8
commit 916b5cf545

View File

@ -387,6 +387,12 @@ smb_got_header(struct socket *socket, struct read_buffer *rb)
conn->est_length = (off_t)atoi(ctype);
#endif
mem_free(ctype);
/* avoid error */
if (!conn->est_length) {
abort_connection(conn, S_OK);
return;
}
}
else mem_free_set(&conn->cached->content_type, ctype);
}