[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTTPAPI http_use_cookies



Sender: craigs@xxxxxxxxx


I am planning on switching from secure FTP to HTTPAPI for the sole reason
of not tying up the FTP application's certificate with other future
possible secure FTP sites.  I have heard if we want to do secure FTP with
another site, we cannot assign an additional certificate to the FTP client
and have it know which one to use for which site.  Then came the
attractiveness of HTTPAPI which can tie a certificate to a user
application.  The main unattractiveness I see in HTTPAPI is in handling
generics.  I think the users can live with that though since the generic
receival transactions will be probably monthly rather than the non-generic
sends done weekly or more.  What I mean by generics is simulating the FTP
"mget '/<file*>'" where the file starts with certain characters.  Also,
doing an FTP delete through HTTPAPI I don't see.  For the send process, it
is wonderful and should work for us.  Am I correct in my thinking so far?
Make sense?
I used HTTPAPI for the first time to post a stream file to
https://sft.wellsfargo.com and it seemed to transfer fine but I have some
questions.
I am going to use http_use_coookies(*on) instead of the exit points like in
EXAMPLE12.  I was able to use certificates and go to
https://sft.wellsfargo.com and upload my file.  When I had my program on
debug I did not notice any "302" redirects.  Could the website change and
start redirecting?  If so, how would I know to have code in place to
redirect with cookies in EXAMPLE12 rather than http_redir_loc in EXAMPLE13?
Just wait until my program blows up to figure it out?  I will probably be
using the method Dave Parnin is using to send to Wells Fargo but this is a
new website so I'm not sure how they will be sending redirects.  The code
is:
http_use_cookies(*on);
dou rc <> 302 and rc <> 301;
   rc = http_url_get(url: '/tmp/httptest.html');
enddo;

Just like in EXAMPLE12 except not using the exit points (http_xproc..
read_hdr and addl_hdr) but the new http_use_cookies(*on).  Well, I used the
exit points in my test but I plan on using the http_use_cookies(*on) for
better functionality.  Should I add:
if rc = 302;
   url = http_redir_loc;
endif;

and remove the http_use_cookies(*on)?  What about the "301" in the example.
Should that be part of the "if" for EXAMPLE13?

I did notice a "302 Found" in the response XML from the http_url_post_stmf.
The details: "The document has moved <A HREF=" /?T " >here</A>.<P>
When clicking on the underlined here in Internet Explorer, it took me to
the root of my own server.  Is that normal?
Thanks in advance!

Craig Strong

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------