mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
smb: abort connection on empty files.
Empty files were causing 'read from socket' errors. [ This is half of commit eef1c17dcef38d35848e75fff3c450bf40e9e851 from the witekfl branch. The FSP half will come later. --KON ]
This commit is contained in:
parent
f70196dde8
commit
916b5cf545
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user