2007-10-02 10:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* harbour/ChangeLog
+ harbour/ChangeLog.019
* ChangeLog archived.
* contrib/tip/cgi.prg
* contrib/tip/url.prg
* contrib/tip/httpcln.prg
* contrib/tip/mail.prg
! Some hash function calls corrected after last modification.
Thanks Juan.
This commit is contained in:
3809
harbour/ChangeLog
3809
harbour/ChangeLog
File diff suppressed because it is too large
Load Diff
3816
harbour/ChangeLog.019
Normal file
3816
harbour/ChangeLog.019
Normal file
File diff suppressed because it is too large
Load Diff
@@ -393,12 +393,12 @@ METHOD StartSession( cSID ) CLASS TIpCgi
|
||||
|
||||
if empty( cSID )
|
||||
|
||||
if ( nH := hb_hGetPos( ::hGets, 'SESSIONID' ) ) != 0
|
||||
cSID := hb_hGetValueAt( ::hGets, nH )
|
||||
elseif ( nH := hb_hGetPos( ::hPosts, 'SESSIONID' ) ) != 0
|
||||
cSID := hb_hGetValueAt( ::hPosts, nH )
|
||||
elseif ( nH := hb_hGetPos( ::hCookies, 'SESSIONID' ) ) != 0
|
||||
cSID := hb_hGetValueAt( ::hCookies, nH )
|
||||
if ( nH := hb_HPos( ::hGets, 'SESSIONID' ) ) != 0
|
||||
cSID := hb_HValueAt( ::hGets, nH )
|
||||
elseif ( nH := hb_HPos( ::hPosts, 'SESSIONID' ) ) != 0
|
||||
cSID := hb_HValueAt( ::hPosts, nH )
|
||||
elseif ( nH := hb_HPos( ::hCookies, 'SESSIONID' ) ) != 0
|
||||
cSID := hb_HValueAt( ::hCookies, nH )
|
||||
endif
|
||||
|
||||
endif
|
||||
@@ -559,11 +559,11 @@ STATIC FUNCTION HtmlScript( xVal, cKey )
|
||||
DEFAULT cKey TO 'script'
|
||||
|
||||
if !empty( xVal )
|
||||
if ( nPos := hb_hGetPos( xVal, cKey ) ) != 0
|
||||
cVal := hb_hGetValueAt( xVal, nPos )
|
||||
if ( nPos := hb_HPos( xVal, cKey ) ) != 0
|
||||
cVal := hb_HValueAt( xVal, nPos )
|
||||
if valtype( cVal ) == "H"
|
||||
if ( nPos := hb_hGetPos( cVal, 'src' ) ) != 0
|
||||
cVal := hb_hGetValueAt( cVal, nPos )
|
||||
if ( nPos := hb_HPos( cVal, 'src' ) ) != 0
|
||||
cVal := hb_HValueAt( cVal, nPos )
|
||||
if valtype( cVal ) == "C"
|
||||
cVal := { cVal }
|
||||
endif
|
||||
@@ -573,8 +573,8 @@ STATIC FUNCTION HtmlScript( xVal, cKey )
|
||||
cVal := cTmp
|
||||
endif
|
||||
endif
|
||||
if ( nPos := hb_hGetPos( cVal, 'var' ) ) != 0
|
||||
cVal := hb_hGetValueAt( cVal, nPos )
|
||||
if ( nPos := hb_HPos( cVal, 'var' ) ) != 0
|
||||
cVal := hb_HValueAt( cVal, nPos )
|
||||
if valtype( cVal ) == "C"
|
||||
cVal := { cVal }
|
||||
endif
|
||||
@@ -600,11 +600,11 @@ STATIC FUNCTION HtmlStyle( xVal, cKey )
|
||||
DEFAULT cKey TO 'style'
|
||||
|
||||
if !empty( xVal )
|
||||
if ( nPos := hb_hGetPos( xVal, cKey ) ) != 0
|
||||
cVal := hb_hGetValueAt( xVal, nPos )
|
||||
if ( nPos := hb_HPos( xVal, cKey ) ) != 0
|
||||
cVal := hb_HValueAt( xVal, nPos )
|
||||
if valtype( cVal ) == "H"
|
||||
if ( nPos := hb_hGetPos( cVal, 'src' ) ) != 0
|
||||
cVal := hb_hGetValueAt( cVal, nPos )
|
||||
if ( nPos := hb_HPos( cVal, 'src' ) ) != 0
|
||||
cVal := hb_HValueAt( cVal, nPos )
|
||||
if valtype( cVal ) == "C"
|
||||
cVal := { cVal }
|
||||
endif
|
||||
@@ -614,8 +614,8 @@ STATIC FUNCTION HtmlStyle( xVal, cKey )
|
||||
cVal := cTmp
|
||||
endif
|
||||
endif
|
||||
if ( nPos := hb_hGetPos( cVal, 'var' ) ) != 0
|
||||
cVal := hb_hGetValueAt( cVal, nPos )
|
||||
if ( nPos := hb_HPos( cVal, 'var' ) ) != 0
|
||||
cVal := hb_HValueAt( cVal, nPos )
|
||||
if valtype( cVal ) == "C"
|
||||
cVal := { cVal }
|
||||
endif
|
||||
|
||||
@@ -123,12 +123,12 @@ METHOD Post( cPostData, cQuery ) CLASS tIPClientHTTP
|
||||
IF HB_IsHash( cPostData )
|
||||
cData := ""
|
||||
FOR nI := 1 TO Len( cPostData )
|
||||
cTmp := HGetKeyAt( cPostData, nI )
|
||||
cTmp := hb_HKeyAt( cPostData, nI )
|
||||
cTmp := hb_cStr( cTmp )
|
||||
cTmp := AllTrim( cTmp )
|
||||
cTmp := TipEncoderUrl_Encode( cTmp )
|
||||
cData += cTmp +"="
|
||||
cTmp := HGetValueAt( cPostData, nI )
|
||||
cTmp := hb_HValueAt( cPostData, nI )
|
||||
cTmp := hb_cStr( cTmp )
|
||||
cTmp := TipEncoderUrl_Encode( cTmp )
|
||||
cData += cTmp + "&"
|
||||
@@ -210,8 +210,8 @@ METHOD StandardFields() CLASS tIPClientHTTP
|
||||
|
||||
//Send optional Fields
|
||||
FOR iCount := 1 TO Len( ::hFields )
|
||||
::InetSendall( ::SocketCon, HGetKeyAt( ::hFields, iCount ) +;
|
||||
": " + HGetValueAt( ::hFields, iCount ) + ::cCRLF )
|
||||
::InetSendall( ::SocketCon, hb_HKeyAt( ::hFields, iCount ) +;
|
||||
": " + hb_HValueAt( ::hFields, iCount ) + ::cCRLF )
|
||||
NEXT
|
||||
|
||||
RETURN .T.
|
||||
@@ -520,12 +520,12 @@ METHOD PostMultiPart( cPostData, cQuery ) CLASS tIPClientHTTP
|
||||
IF empty(cPostData)
|
||||
elseif HB_IsHash( cPostData )
|
||||
FOR nI := 1 TO Len( cPostData )
|
||||
cTmp := HGetKeyAt( cPostData, nI )
|
||||
cTmp := hb_HKeyAt( cPostData, nI )
|
||||
cTmp := hb_cStr( cTmp )
|
||||
cTmp := AllTrim( cTmp )
|
||||
cTmp := TipEncoderUrl_Encode( cTmp )
|
||||
cData += cBound+cCrlf+'Content-Disposition: form-data; name="'+cTmp +'"'+cCrlf+cCrLf
|
||||
cTmp := HGetValueAt( cPostData, nI )
|
||||
cTmp := hb_HValueAt( cPostData, nI )
|
||||
cTmp := hb_cStr( cTmp )
|
||||
cTmp := AllTrim( cTmp )
|
||||
cTmp := TipEncoderUrl_Encode( cTmp )
|
||||
|
||||
@@ -171,11 +171,11 @@ RETURN ::cBody
|
||||
METHOD GetFieldPart( cPart ) CLASS TipMail
|
||||
LOCAL nPos, cEnc
|
||||
|
||||
nPos := hb_HGetPos( ::hHeaders, cPart )
|
||||
nPos := hb_HPos( ::hHeaders, cPart )
|
||||
IF nPos == 0
|
||||
RETURN ""
|
||||
ELSE
|
||||
cEnc := hb_HGetValueAt( ::hHeaders, nPos )
|
||||
cEnc := hb_HValueAt( ::hHeaders, nPos )
|
||||
nPos := At( ";", cEnc )
|
||||
IF nPos != 0
|
||||
cEnc := Substr( cEnc, 1, nPos - 1)
|
||||
@@ -189,11 +189,11 @@ METHOD GetFieldOption( cPart, cOption ) CLASS TipMail
|
||||
LOCAL nPos, aMatch
|
||||
LOCAL cEnc
|
||||
|
||||
nPos := hb_HGetPos( ::hHeaders, cPart )
|
||||
nPos := hb_HPos( ::hHeaders, cPart )
|
||||
IF nPos == 0
|
||||
RETURN ""
|
||||
ELSE
|
||||
cEnc := hb_HGetValueAt( ::hHeaders, nPos )
|
||||
cEnc := hb_HValueAt( ::hHeaders, nPos )
|
||||
// Case insensitive check
|
||||
aMatch := HB_Regex( ";\s*" + cOption +"\s*=\s*([^;]*)", cEnc, .F. )
|
||||
IF aMatch != NIL
|
||||
@@ -208,11 +208,11 @@ RETURN cEnc
|
||||
METHOD SetFieldPart( cPart, cValue ) CLASS TipMail
|
||||
LOCAL nPos, cEnc
|
||||
|
||||
nPos := hb_HGetPos( ::hHeaders, cPart )
|
||||
nPos := hb_HPos( ::hHeaders, cPart )
|
||||
IF nPos == 0
|
||||
::hHeaders[ cPart ] := cValue
|
||||
ELSE
|
||||
cEnc := hb_HGetValueAt( ::hHeaders, nPos )
|
||||
cEnc := hb_HValueAt( ::hHeaders, nPos )
|
||||
nPos := At( ";", cEnc )
|
||||
IF nPos == 0
|
||||
::hHeaders[ cPart ] := cValue
|
||||
@@ -228,11 +228,11 @@ METHOD SetFieldOption( cPart, cOption, cValue ) CLASS TipMail
|
||||
LOCAL nPos, aMatch
|
||||
LOCAL cEnc
|
||||
|
||||
nPos := hb_HGetPos( ::hHeaders, cPart )
|
||||
nPos := hb_HPos( ::hHeaders, cPart )
|
||||
IF nPos == 0
|
||||
Return .F.
|
||||
ELSE
|
||||
cEnc := hb_HGetValueAt( ::hHeaders, nPos )
|
||||
cEnc := hb_HValueAt( ::hHeaders, nPos )
|
||||
aMatch := HB_Regex( "(.*?;\s*)" + cOption +"\s*=[^;]*(.*)?", cEnc, .F. )
|
||||
IF Empty( aMatch )
|
||||
::hHeaders[ cPart ] := cEnc += "; "+ cOption + '="' + cValue + '"'
|
||||
@@ -335,12 +335,12 @@ METHOD ToString() CLASS TipMail
|
||||
endif
|
||||
|
||||
FOR i := 1 TO Len( ::hHeaders )
|
||||
cElem := Lower(hb_HGetKeyAt( ::hHeaders, i ))
|
||||
cElem := Lower(hb_HKeyAt( ::hHeaders, i ))
|
||||
IF cElem != "return-path" .and. cElem != "delivered-to" .and.;
|
||||
cElem != "date" .and. cElem != "from" .and.;
|
||||
cElem != "to" .and. cElem != "subject" .and. cElem !="mime-version"
|
||||
cRet += hb_HGetKeyAt( ::hHeaders, i ) + ": " +;
|
||||
hb_HGetValueAt( ::hHeaders, i ) + e"\r\n"
|
||||
cRet += hb_HKeyAt( ::hHeaders, i ) + ": " +;
|
||||
hb_HValueAt( ::hHeaders, i ) + e"\r\n"
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -204,12 +204,12 @@ METHOD AddGetForm( cPostData )
|
||||
|
||||
IF HB_IsHash( cPostData )
|
||||
FOR nI := 1 TO Len( cPostData )
|
||||
cTmp := hb_HGetKeyAt( cPostData, nI )
|
||||
cTmp := hb_HKeyAt( cPostData, nI )
|
||||
cTmp := hb_cStr( cTmp )
|
||||
cTmp := AllTrim( cTmp )
|
||||
cTmp := TipEncoderUrl_Encode( cTmp )
|
||||
cData += cTmp +"="
|
||||
cTmp := hb_HGetValueAt( cPostData, nI )
|
||||
cTmp := hb_HValueAt( cPostData, nI )
|
||||
cTmp := hb_cStr( cTmp )
|
||||
cTmp := AllTrim( cTmp )
|
||||
cTmp := TipEncoderUrl_Encode( cTmp )
|
||||
|
||||
Reference in New Issue
Block a user