* modules/control/http.c: allow directories of the form "x:\" on win32.
* http.c : http mini-server ;)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* http.c : http mini-server ;)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: http.c,v 1.19 2003/07/30 21:09:06 gbazin Exp $
+ * $Id: http.c,v 1.20 2003/07/31 21:46:37 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
- /* remove trailling separoator */
- while( strlen( psz_dir ) > 1 && psz_dir[strlen( psz_dir ) -1 ] == sep )
+ /* remove trailling separator */
+ while( strlen( psz_dir ) > 1 &&
+#if defined( WIN32 )
+ !( strlen(psz_dir)==3 && psz_dir[1]==':' && psz_dir[2]==sep ) &&
+#endif
+ psz_dir[strlen( psz_dir ) -1 ] == sep )
{
psz_dir[strlen( psz_dir ) -1 ] ='\0';
}
{
psz_dir[strlen( psz_dir ) -1 ] ='\0';
}
* win32_specific.c: Win32 specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* win32_specific.c: Win32 specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: win32_specific.c,v 1.23 2003/07/18 20:52:11 gbazin Exp $
+ * $Id: win32_specific.c,v 1.24 2003/07/31 21:46:37 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
/* Set the default file-translation mode */
_fmode = _O_BINARY;
/* Set the default file-translation mode */
_fmode = _O_BINARY;
+ _setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
/* WinSock Library Init. */
if( !WSAStartup( MAKEWORD( 2, 0 ), &Data ) )
/* WinSock Library Init. */
if( !WSAStartup( MAKEWORD( 2, 0 ), &Data ) )