[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cookies
hi Scott,
This is a part of pgm:
callp http_cookie_file('/tmp/cook.txt':*ON)
callp http_use_cookies(*ON)
eval tip = 'cert'
eval agent = 'Mozilla/4.0 (compatible; +
MSIE 8.0; +
Windows NT 5.1; +
Trident/4.0)'
callp http_debug(*ON)
eval rc = https_init(APP_ID)
if rc = -1
callp http_comp(http_error)
callp https_cleanup
return
endif
eval Form = WEBFORM_open
callp WEBFORM_SetVar(Form: 'login-form-type': tip )
callp WEBFORM_postData( Form : myPointer
: dataSize )
eval rc = http_url_post(
'https://collaudowb.hbl.local/pkmslogin.form'
: myPointer
: datasize
: '/tmp/testpost.html'
: HTTP_TIMEOUT
: agent
: 'application/x-www-form-urlencoded' )
if rc = -1
eval msg = http_error
dsply msg
goto fine
endif
eval count = 0
dou rc<301 or rc>303 or count>100
eval count = count + 1
eval url = http_redir_loc()
eval rc = http_url_get(url:'/tmp/testpost1.html')
enddo
..... this is the log:
HTTPAPI Ver 1.24beta11 released 2010-09-09
OS/400 Ver V6R1M0
https_init(): entered
-------------------------------------------------------------------------------
------
Dump of local-side certificate information:
-------------------------------------------------------------------------------
------
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
Serial Number: 01
Common Name: user collaudo
Country: it
Org Unit: hbl
Org: webservices
Issuer CN: collaudowb
Issuer Country: IT
Issuer State/Province: Perak
Issuer Locality: Sitiawan
Issuer Org: HBL
Issuer Org Unit: webservices
Version: 03
not before: 20080408141514
not after: 20120103131514
pub key alg: 1.2.840.113549.1.1.4
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: UCS.CED.LAN
DNS server found: 10.176.16.13
DNS server found: 10.176.16.14
DNS server found: 10.176.16.15
-------------------------------------------------------------------------------
------
Dump of server-side certificate information:
-------------------------------------------------------------------------------
------
Cert Validation Code = 6000
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
Serial Number: 45:F5:3B:C6
Common Name: collaudowb.hbl.local
Country: IT
Issuer CN: collaudowb.hbl.local
Issuer Country: IT
Version: 03
not before: 20070311123846
not after: 20170309123846
pub key alg: 1.2.840.113549.1.1.4
Protocol Used: TLS Version 1
http_persist_post(): entered
http_long_ParseURL(): entered
do_oper(POST): entered
POST /pkmslogin.form HTTP/1.1
Host: collaudowb.hbl.local
User-Agent: http-api/1.24
Content-Type: application/x-www-form-urlencoded
Content-Length: 20
Cookie: $Version=0; PD-H-SESSION-ID=4_0_p2kysvnF0S7RDGOBYZyoJC0F8EZ5+46lPCtW-ob
m5SmIrHK5; $Path=/;
senddoc(): entered
login-form-type=cert
recvresp(): entered
HTTP/1.1 302 Moved Temporarily
connection: close
content-length: 1157
content-type: text/html
date: Wed, 06 Apr 2011 07:25:21 GMT
location: https://collaudowb.hbl.local/pkmscertpromptstagen
p3p: CP="NON CUR OTPi OUR NOR UNI"
server: WebSEAL/6.1.1.1 (Build 110214)
cache-control: no-cache
pragma: no-cache
Set-Cookie: PD-H-SESSION-ID=4_0_p2kysvnF0S7RDGOBYZyoJC0F8EZ5+46lPCtW-obm5SmIrHK
5; Path=/
SetError() �13: HTTP/1.1 302 Moved Temporarily
recvresp(): end with 302
recvdoc parms: identity 1157
header_load_cookies() entered
cookie_read() entered.
read cookies in /tmp/cookies.txt
No cookie file found. (This may mean that no cookies have been received yet.)
cookie_parse() entered
cookie = PD-H-SESSION-ID=4_0_p2kysvnF0S7RDGOBYZyoJC0F8EZ5+46lPCtW-obm5SmIrHK5;
Path=/
cookie attr PD-H-SESSION-ID=4_0_p2kysvnF0S7RDGOBYZyoJC0F8EZ5+46lPCtW-obm5SmIrHK
5
cookie attr Path=/
cookie_dump() entered.
cookie file is /tmp/cookies.txt
recvdoc(): entered
SetError() �0:
(GSKit) I/O: Descrittore non valido.
ssl_error(406): (GSKit) I/O: Descrittore non valido.
SetError() �44: CommSSL_read: read:(GSKit) I/O: Descrittore non valido.
http_close(): entered
You can help me??? Thanks...
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------