2012-07-30 16:06 UTC+0200 Viktor Szakats (harbour syenar.net)
+ contrib/hbtip/tests/test01.prg
* contrib/hbtip/httpcli.prg
! RTE was happening in class TIPClientHTTP when calling method post() after calling method setCookie():
Error BASE/1123 Argument error: HB_HKEYAT
Called from HB_HKEYAT(0)
Called from TIPCLIENTHTTP:GETCOOKIES(0)
This error happens because in r7888 (changelog: 2007-10-30 19:45 UTC+0100 Lorenzo Fiorini (lorenzo.fiorini/at/gmail.com))
the function HGetKeys() was replaced by HB_HKeyAt() and the correct is HB_HKeys().
; Report, patch and description by Raphael Gozzo. Thank you.
This commit is contained in:
@@ -16,6 +16,17 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-07-30 16:06 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
+ contrib/hbtip/tests/test01.prg
|
||||
* contrib/hbtip/httpcli.prg
|
||||
! RTE was happening in class TIPClientHTTP when calling method post() after calling method setCookie():
|
||||
Error BASE/1123 Argument error: HB_HKEYAT
|
||||
Called from HB_HKEYAT(0)
|
||||
Called from TIPCLIENTHTTP:GETCOOKIES(0)
|
||||
This error happens because in r7888 (changelog: 2007-10-30 19:45 UTC+0100 Lorenzo Fiorini (lorenzo.fiorini/at/gmail.com))
|
||||
the function HGetKeys() was replaced by HB_HKeyAt() and the correct is HB_HKeys().
|
||||
; Report, patch and description by Raphael Gozzo. Thank you.
|
||||
|
||||
2012-07-30 12:47 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* ChangeLog
|
||||
! typo in prev ChangeLog example
|
||||
|
||||
@@ -455,7 +455,7 @@ METHOD getcookies( cHost, cPath ) CLASS tIPClientHTTP
|
||||
ASort( aPathKeys,,, {| cX, cY | Len( cX ) > Len( cY ) } )
|
||||
b := Len( aPathKeys )
|
||||
FOR a := 1 TO b
|
||||
aKeys := hb_Hkeyat( ::hCookies[ aDomKeys[ x ] ] [ aPathKeys[ a ] ] )
|
||||
aKeys := hb_Hkeys( ::hCookies[ aDomKeys[ x ] ][ aPathKeys[ a ] ] )
|
||||
d := Len( aKeys )
|
||||
FOR c := 1 TO d
|
||||
IF ! Empty( cOut )
|
||||
|
||||
26
harbour/contrib/hbtip/tests/test01.prg
Normal file
26
harbour/contrib/hbtip/tests/test01.prg
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL oHttp
|
||||
|
||||
CLS
|
||||
|
||||
oHttp := TIPClientHTTP():New( "http://www.google.com", .T. )
|
||||
|
||||
oHttp:setCookie( "test01=value01" )
|
||||
|
||||
IF ! oHttp:open()
|
||||
? "Error: oHttp:open(): " + oHttp:lastErrorMessage()
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
IF ! oHttp:post( "test" )
|
||||
? "Error: oHttp:post(): " + oHttp:lastErrorMessage()
|
||||
ENDIF
|
||||
|
||||
oHttp:close()
|
||||
|
||||
RETURN
|
||||
Reference in New Issue
Block a user