View | Details | Raw Unified | Return to bug 44382
Collapse All | Expand All

(-)C:/Documents and Settings/Jim/workspace/tomcat-trunk/java/org/apache/catalina/connector/Response.java (-4 / +16 lines)
Lines 946-959 Link Here
946
946
947
    }
947
    }
948
948
949
950
    /**
949
    /**
951
     * Add the specified Cookie to those that will be included with
950
     * Add the specified Cookie to those that will be included with
952
     * this Response.
951
     * this Response.
953
     *
952
     *
954
     * @param cookie Cookie to be added
953
     * @param cookie Cookie to be added
955
     */
954
     */
956
    public void addCookieInternal(final Cookie cookie) {
955
    public void addCookieInternal(final Cookie cookie, boolean httpOnly) {
957
956
958
        if (isCommitted())
957
        if (isCommitted())
959
            return;
958
            return;
Lines 968-974 Link Here
968
                        (sb, cookie.getVersion(), cookie.getName(), 
967
                        (sb, cookie.getVersion(), cookie.getName(), 
969
                         cookie.getValue(), cookie.getPath(), 
968
                         cookie.getValue(), cookie.getPath(), 
970
                         cookie.getDomain(), cookie.getComment(), 
969
                         cookie.getDomain(), cookie.getComment(), 
971
                         cookie.getMaxAge(), cookie.getSecure());
970
                         cookie.getMaxAge(), cookie.getSecure(),
971
                         httpOnly);
972
                    return null;
972
                    return null;
973
                }
973
                }
974
            });
974
            });
Lines 976-982 Link Here
976
            ServerCookie.appendCookieValue
976
            ServerCookie.appendCookieValue
977
                (sb, cookie.getVersion(), cookie.getName(), cookie.getValue(),
977
                (sb, cookie.getVersion(), cookie.getName(), cookie.getValue(),
978
                     cookie.getPath(), cookie.getDomain(), cookie.getComment(), 
978
                     cookie.getPath(), cookie.getDomain(), cookie.getComment(), 
979
                     cookie.getMaxAge(), cookie.getSecure());
979
                     cookie.getMaxAge(), cookie.getSecure(),
980
                     httpOnly);
980
        }
981
        }
981
        //if we reached here, no exception, cookie is valid
982
        //if we reached here, no exception, cookie is valid
982
        // the header name is Set-Cookie for both "old" and v.1 ( RFC2109 )
983
        // the header name is Set-Cookie for both "old" and v.1 ( RFC2109 )
Lines 986-991 Link Here
986
987
987
        cookies.add(cookie);
988
        cookies.add(cookie);
988
    }
989
    }
990
    
991
    /**
992
     * Add the specified Cookie to those that will be included with
993
     * this Response. This called the non-httpOnly version of 
994
     * addCookieInternal for backwards-compatibility support
995
     *
996
     * @param cookie Cookie to be added
997
     */
998
    public void addCookieInternal(final Cookie cookie) {
999
    	addCookieInternal(cookie, false);
1000
    }
989
1001
990
1002
991
    /**
1003
    /**

Return to bug 44382