answer->i_body = 0;
answer->p_body = NULL;
- httpd_MsgAdd( answer, "Server", "%s", PACKAGE_STRING );
+ httpd_MsgAdd( answer, "Server", "VLC/%s", VERSION );
httpd_MsgAdd( answer, "Content-Length", "0" );
switch( query->i_proto )
continue;
/* */
-#ifdef HAVE_ACCEPT4
- fd = accept4 (fd, NULL, NULL, SOCK_CLOEXEC);
- if (fd == -1 && errno == ENOSYS)
-#endif
- fd = accept (fd, NULL, NULL);
+ fd = vlc_accept (fd, NULL, NULL, true);
if (fd == -1)
continue;
+ setsockopt (fd, SOL_SOCKET, SO_REUSEADDR,
+ &(int){ 1 }, sizeof(int));
- net_SetupSocket (fd);
if( p_tls != NULL )
{
switch( tls_ServerSessionHandshake( p_tls, fd ) )