2012-11-10 20:55 UTC+0100 Viktor Szakats (harbour syenar.net)

* src/rtl/hbgtcore.c
    * changed HB_GTI_COMPATBUFFER default to be Clipper
      compatible. INCOMPATIBLE compared to 3.2 versions,
      but restores the compatibility with previous ones
      and Clipper. Applications using Unicode, must now 
      manually change these buffers to be Unicode 
      compatible using:
         #include "hbgtinfo.ch"
         hb_gtInfo( HB_GTI_COMPATBUFFER, .F. )

  * include/assert.ch
  * include/hbclass.ch
  * contrib/rddads/ads.ch
  * contrib/xhb/hbdll.ch
  * contrib/xhb/hblog.ch
  * contrib/xhb/ttable.ch
    ! use 'END' instead of 'ENDIF' consistently
      in command translated code. (most of these
      is result of recent regression)

  * contrib/gtwvg/class.prg
  * contrib/gtwvg/combobox.prg
  * contrib/gtwvg/crt.prg
  * contrib/gtwvg/menubar.prg
  * contrib/gtwvg/statbar.prg
  * contrib/gtwvg/static.prg
  * contrib/gtwvg/syswnd.prg
  * contrib/gtwvg/tests/_modal.prg
  * contrib/gtwvg/wnd.prg
  * contrib/hbgd/tests/test_out.prg
  * contrib/hbmysql/tmysql.prg
  * contrib/xhb/decode.prg
  * contrib/xhb/xhbtedit.prg
  * extras/hbdoc/hbdoc.prg
  * extras/httpsrv/cgifunc.prg
  * extras/httpsrv/session.prg
    % deleted excessive parenthesis
    ! fixed some '- 1' to '-1' in older hbformatted
      code

  * extras/gtwvw/tests/_wvwmous.prg
  * extras/gtwvw/tests/wvt2wvw.ch
  * extras/hbvpdf/core.prg
  * extras/httpsrv/uhttpd.prg
  * extras/rddado/adordd.ch
  * include/hbsix.ch
    * minor cleanups
This commit is contained in:
Viktor Szakats
2012-11-10 20:04:37 +00:00
parent 45a48cc8d0
commit 3f4cf28f68
30 changed files with 154 additions and 117 deletions

View File

@@ -90,7 +90,7 @@ FUNCTION uhttpd_GetVars( cFields, cSeparator )
ELSE
// now check if variable already exists. If yes and I have already another element
// with same name, then I will change it to an array
IF ( hb_HPos( hHashVars, cName ) ) > 0
IF hb_HPos( hHashVars, cName ) > 0
IF ! HB_ISARRAY( hHashVars[ cName ] )
// Transform it to array
hHashVars[ cName ] := { hHashVars[ cName ] }

View File

@@ -653,7 +653,7 @@ METHOD SessionRead( cID ) CLASS uhttpd_Session
nFileSize := FSeek( nH, 0, FS_END )
FSeek( nH, 0, FS_SET )
cBuffer := Space( nFileSize )
IF ( FRead( nH, @cBuffer, nFileSize ) ) != nFileSize
IF FRead( nH, @cBuffer, nFileSize ) != nFileSize
// uhttpd_Die( "ERROR: On reading session file : " + cFile + ", File error : " + hb_CStr( FError() ) )
hb_idleSleep( ::nFileWait / 1000 )
LOOP
@@ -693,7 +693,7 @@ METHOD SessionWrite( cID, cData ) CLASS uhttpd_Session
IF nFileSize > 0
DO WHILE nRetry++ <= ::nFileRetry
IF ( nH := hb_FCreate( cFile, FC_NORMAL, FO_READWRITE + FO_DENYWRITE ) ) != F_ERROR
IF ( FWrite( nH, @cData, nFileSize ) ) != nFileSize
IF FWrite( nH, @cData, nFileSize ) != nFileSize
uhttpd_Die( "ERROR: On writing session file : " + cFile + ", File error : " + hb_CStr( FError() ) )
ELSE
lOk := .T.

View File

@@ -1159,15 +1159,15 @@ STATIC FUNCTION ParseRequest( cRequest )
_SERVER[ "SCRIPT_NAME" ] := hUrl[ "URI" ]
_SERVER[ "QUERY_STRING" ] := hUrl[ "QUERY" ]
/*
IF ( nI := AT( "?", _SERVER[ "REQUEST_URI" ] ) ) > 0
_SERVER[ "SCRIPT_NAME" ] := LEFT( _SERVER[ "REQUEST_URI" ], nI - 1)
_SERVER[ "QUERY_STRING" ] := SUBSTR( _SERVER[ "REQUEST_URI" ], nI + 1)
#if 0
IF ( nI := At( "?", _SERVER[ "REQUEST_URI" ] ) ) > 0
_SERVER[ "SCRIPT_NAME" ] := Left( _SERVER[ "REQUEST_URI" ], nI - 1 )
_SERVER[ "QUERY_STRING" ] := SubStr( _SERVER[ "REQUEST_URI" ], nI + 1 )
ELSE
_SERVER[ "SCRIPT_NAME" ] := _SERVER[ "REQUEST_URI" ]
_SERVER[ "QUERY_STRING" ] := ""
ENDIF
*/
#endif
FOR nI := 2 TO Len( aRequest )
IF aRequest[ nI ] == ""; EXIT
@@ -1682,15 +1682,6 @@ PROCEDURE uhttpd_SetHeader( cType, cValue )
FUNCTION uhttpd_GetHeader( cType )
RETURN uhttpd_HGetValue( _HTTP_RESPONSE, cType )
/*
__defaultNIL( @nPos, 1 )
nPos := hb_HPos( hHash, cKey ))
IF ( nPos := ASCAN( t_aHeader, {| x | UPPER( x[ 1 ] ) == UPPER( cType ) }, nPos ) ) > 0
RETURN t_aHeader[ nPos, 2 ]
ENDIF
RETURN NIL
*/
PROCEDURE uhttpd_DelHeader( cType )
@@ -1701,14 +1692,6 @@ PROCEDURE uhttpd_DelHeader( cType )
ENDIF
RETURN
/*
LOCAL nI
IF ( nI := ASCAN( t_aHeader, {| x | UPPER( x[ 1 ] ) == UPPER( cType ) } ) ) > 0
hb_aDel( t_aHeader, nI, .T. )
ENDIF
RETURN
*/
PROCEDURE uhttpd_Write( cString )
@@ -2817,7 +2800,7 @@ STATIC FUNCTION Handler_CgiScript( cFileName )
WriteToConsole( "Executing: " + cFileName )
IF ( CGIExec( uhttpd_OSFileName( cFileName ), @xResult ) ) == 0
IF CGIExec( uhttpd_OSFileName( cFileName ), @xResult ) == 0
// uhttpd_SetHeader( "Content-Type", cI )
// uhttpd_Write( xResult )