So far,

The dummy mistake was in the curly braquets.

set result [ns_httpspost "https://acesso.uol.com.br/login.html"; {} {$qsset}
{} {} 30 {}]

After I took them out it worked fine.

set result [ns_httpspost "https://acesso.uol.com.br/login.html"; {} $qsset
{} {} 30 {}]


I can connect through and the post result the session code value
"
http://mail.uol.com.br/login/doorway?_webmail_session_id=clllcUdVWnh4QURMNWpjaGlublUyeWtKNndCUDkraC9VMlZWcjk3MFdVQ0RoNERsL1JBK3lkVWJYMEtTZ0l1T09YSWxLZzlwWFA3T25ZbG1ITHJuRVFIWVRxcG9LNE9USCs2TlZsNmxPZFZaaFZqOG5BSzJWSXk2YmlCbm41ZnItLUVWVFdPKzRjRXpHaStWZmo3aTJ0MHc9PQ
"


Now, I have a problem with requesting data I need. With the result of
httpspost I create  new ns_set and tried to get the http result:

set qsset [ns_set create qsset $url $arg]
set result [ns_httpget "http://mail.uol.com.br/addressbook"; 30 0 $qsset]

But somehow if kicks me out telling the session was expired.

Is there a way to keep connected not loosing the auths values and sessions
variables and then get the data I need?


Cheers,
Iuri


On Sun, Mar 17, 2013 at 8:58 AM, Iuri Sampaio <iuri.samp...@gmail.com>wrote:

> Hi there,
>
> I created the code bellow that calls httpspost to authenticates against a
> https url with a few arguments (user, password, skin, dest). In order to
> pass arguments through via post they must be within a set structure.
>
> *** I believe I didn't even need  the first line becasue ns_getform
> already returns the identical set structure needed as argument for qsset on
> httpspost. However I added it just to stay o the right side.  The TCL
> script is bellow.
>
> ## script.tcl
>
> ns_set create qsset [ns_getform]
>
> set result [ns_httpspost "https://acesso.uol.com.br/login.html"; {}
> {$qsset} {multipart/form-data} {} {30} {}]
>
> ##
>
>
> However [ns_httpspost] returns an error  regarding the  command [ns_set
> size $qsset] at line 250
>
> [17/Mar/2013:11:42:46][30452.3039562608][-default:10-] Error: POST
> http://206.192.23.166:8050/natopia-core/invite/invite-uol?
> referred by "
> http://natopia.iurix.com/natopia-core/invite/invite-emails.html";
> no such set: $qsset
>     while executing
> "ns_set size $qsset"
>     (procedure "ns_httpspost" line 46)
>     invoked from within
> "ns_httpspost "https://acesso.uol.com.br/login.html"; {} {$qsset}
> {multipart/form-data} {} {30} {}"
>     invoked from within
> "set result [ns_httpspost "https://acesso.uol.com.br/login.html"; {}
> {$qsset} {multipart/form-data} {} {30} {}]"
>     ("uplevel" body line 38)
>     invoked from within
> "uplevel {
> ad_page_contract {}
>
>
>
> I went to ns_httpspost source code and I placed a ns_log within it.
>
> ns_log Notice "$url \n $rqset \n $qsset \n $type "
>
> Curiously It doesn't show the content of qsset but its label "$qsset"
>
> [17/Mar/2013:11:42:46][30452.3039562608][-default:10-] Notice:
> https://acesso.uol.com.br/login.html
>
>  $qsset
>  multipart/form-data
> [17/Mar/2013:11:42:46][30452.3039562608][-default:10-] Warn...
>
>
> Does it have any relation with the error?
> How do I make qsset variable to be recognizable within the procedure
> ns_httpspost
>
>
> Cheers,
> Iuri
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk

Reply via email to