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:
Viktor Szakats
2012-07-30 14:08:36 +00:00
parent 9638240b42
commit e92edfa2a4
3 changed files with 38 additions and 1 deletions

View File

@@ -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

View File

@@ -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 )

View 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