This env. var depends on the headers of the HTTP request, so I wouldn't rely
on it.

I would use a session cookie to see if the user is logged in or not. That
means adding a little routine to the beginning of every program in your
application so that if the user isn't logged in you redirect them to the
login page.

It's not that painful if implemented correctly. :)

Bradley V. Stone
BVSTools - www.bvstools.com
eRPG SDK - www.erpgsdk.com

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]On
Behalf Of John Rusling
Sent: Tuesday, October 21, 2008 10:10 AM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] CGIDEV2 and environment variable - HTTP_REFERER.


If I understand correctly, this environment variable should contain
the previous browser link/url that the browser was on when they
typed in the link that got them to here.

Ie; if a user was at anyurl.com, and the user types in
http://my400.com/pgm1.pgm then the variable returned from
CGIDEV2's HTTP_REFERER from pgm1 should contain 'anyurl.com'.

Is this correct?

And, if this is correct, why is HTTP_REFERER always blank for me?
(I've tried on our development and production as/400's. (iSeries)
and this is always blank.)

I haven't been able to find out much about this in my searches.

What I'd like to do is, if a request comes in to pgm1.pgm and that
browser/user isn't logged in, I'd like to pop the login.pgm, make them
login, and once they are logged in, direct them to where they were
heading. Ie; pgm1.pgm. I'd like to do this program-atically in my rpg.

My hope was that saving HTTP_REFERER would allow me to do this.

Fyi - both login.pgm & pgm1.pgm are in rpg.

Any help or direction is appreciated.

John B.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.