 |
 |
11. Overview of Cookieless Shopping (wrapper.cgi)
11.1 Functionality
wrapper.cgi, the cookieless shopping script, is invoked by inbound.cgi
when the web browser
does not accept a cookie, so that shopping can continue.
Wrapper gets the page contents from the apache server
and rewrites the links to pass through the wrapper and
display on the contents on the browser.
The 3 major functions are FixLinks, InsertEntry and Load_Module
-
FixLinks - Rewrite links to pass through wrapper
-
InsertEntry - Write information about the pages visited in the clicks table.
-
Load_Module - Load LWP::UserAgent and exit gracefully
with an appropriate error message if not found
11.2 Requirements
Wrapper uses LWP::UserAgent. To get it working, the following packages have
to be installed.
-
URI
-
HTML::Parser
-
MIME::Base64
-
Digest::MD5
-
libwww-perl
These packages can be obtained from http://www.linpro.no/lwp or CPAN.
11.3 Testing
General guidelines
-
Configure web browser to not accept cookies or to prompt for cookies
which you don't accept. On recent Netscape browsers that is the
Edit->Preferences option. Then select Category Advanced. You will
see the Cookies options.
-
You should either see your site with all your links
passing through wrapper or an error message on the browser
with an appropriate error message.
-
Go through the entire checkout process, check to see all
links pass through wrapper.
-
Check entries in sessions and clicks tables.
11.4 Limitation
-
Wrapper reads one line at a time and rewrites links to
pass through it, hence it arises a lot of limitations.
Care is required while creating or modifying
templates. Shown below are classical examples, which are
not handled by wrapper.
-
HREF= "12-AA.shtml" --- Extra space
-
HREF = "12-AA.shtml" --- Extra space
-
HREF="12AA.shtml" --- Hardcoded in digit-char format
-
HREF="12-AA.html" --- Hardcoded to shtml
-
HREF=12-AA.shml --- NO "
-
FORM METHOD=POST
ACTION="/cgi-bin/om/search.cgi"
--- Need to be on the same line
-
FORM METHOD=POST ACTION="/cgi-bin/om/search.cgi"
--- Extra space between POST and ACTION
-
HTTPS requests are handled as HTTP
|