Re: svn commit: r732023 - /ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r732023 - /ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java

Adam Heath-2
[hidden email] wrote:
> Author: jaz
> Date: Tue Jan  6 09:49:52 2009
> New Revision: 732023
>
> URL: http://svn.apache.org/viewvc?rev=732023&view=rev
> Log:
> found a few more instances of cookie.setVersion(1) which is experimental (from javadoc) and does not work in safari. Added event method to remove ACCESS code cookies

Doing multiple completely separate things in a single commit is frowned
upon.

> +
> +    /** Removes the ACCESS tracking code cookie */
> +    public static String removeAccesTrackingCodeCookie(HttpServletRequest request, HttpServletResponse response) {
> +        Cookie[] cookies = request.getCookies();
> +        if (cookies != null) {
> +            for (Cookie cookie : cookies) {
> +                if (cookie.getName().endsWith("_ACCESS")) {
> +                    cookie.setMaxAge(0);
> +                    response.addCookie(cookie);
> +                }
> +            }
> +        }
> +        return "success";
> +    }
> +

Shouldn't that be removeAcces*s*TrackingCodeCookie?