Cookie Invalidation Or Expiration By A Switch
A switch may be used to force the expiration of a cookie on a user's system by inserting an expiration field into the cookie contained in a network response packet. Additionally, a mechanism is provided to delete or damage a cookie contained in a network request packet, so that server software is not disrupted by the receipt of a cookie. Deleting a cookie results in a cleaner request, but damaging a cookie may be more efficient in certain circumstances. By providing these features, an efficient cookie switching design is provided.
1 . A method comprising:
at a network device configured to perform packet switching, swapping a first odd byte/even byte pair of a cookie header name with a second odd byte/even byte pair of the cookie header name if the cookie header name begins at an even byte from a beginning point of a header of a network request packet; and
swapping a first even byte/odd byte pair of the cookie header name with a second even byte/odd byte pair of the cookie header name if the cookie header name begins at an odd byte from a beginning point of the header of the network request packet.
2 . The method of claim 1 , wherein an odd byte/even byte pair is an odd byte followed by an even byte.
3 . The method of claim 1 , wherein an even byte/odd byte pair is an even byte followed by an odd byte.
4 . The method of claim 1 , wherein the method is only performed for network request packets to be routed to a particular server and wherein the particular server is registered as not wanting to receive the cookie.
5 . A method comprising:
at a network device configured to perform packet switching, swapping a first odd byte/even byte pair of a cookie name with a second odd byte/even byte pair of the cookie name if the cookie name begins at an even byte from a beginning point of a header of a network request packet; and
swapping a first even byte/odd byte pair of the cookie name with a second even byte/odd byte pair of the cookie name if the cookie name begins at an odd byte from a beginning point of the header of the network request packet.
6 . The method of claim 5 , wherein an odd byte/even byte pair is an odd byte followed by an even byte.
7 . The method of claim 5 , wherein an even byte/odd byte pair is an even byte followed by an odd byte.
8 . The method of claim 5 , wherein the method is only performed for network request packets to be routed to a particular server and wherein the particular server is registered as not wanting to receive the cookie.
9 . A method comprising:
at a network switch configured to perform packet switching, swapping a first odd byte/even byte pair of a cookie header name with a second odd byte/even byte pair of the cookie header name if the cookie header name begins at an even byte from a beginning point of a header of a network request packet and if the cookie is an only cookie in a cookie header in the network request packet;
swapping a first even byte/odd byte pair of the cookie header name with a second even byte/odd byte pair of the cookie header name if the cookie header name begins at an odd byte from a beginning point of the header of the network request packet and if the cookie is the only cookie in a cookie header in the network request packet;
swapping a first odd byte/even byte pair of the cookie name with a second odd byte/even byte pair of the cookie name if the cookie name begins at an even byte from a beginning point of the header of the network request packet and if the cookie is one of a plurality of cookies in the network request packet; and
swapping a first even byte/odd byte pair of the cookie name with a second even byte/odd byte pair of the cookie name if the cookie name begins at an odd byte from a beginning point of the header of the network request packet and if the cookie is one of a plurality of cookies in the network request packet.
10 . The method of claim 9 , wherein an odd byte/even byte pair is an odd byte followed by an even byte.
11 . The method of claim 9 , wherein an even byte/odd byte pair is an even byte followed by an odd byte.
12 . The method of claim 9 , wherein the method is only performed for network request packets to be routed to a particular server and wherein the particular server is registered as not wanting to receive the cookie.
13 . A method comprising:
at a network device configured to perform packet switching, swapping a first odd byte/even byte pair of a header name with a second odd byte/even byte pair of the header name if the header name begins at an even byte from a beginning point of a header of a network packet; and
swapping a first even byte/odd byte pair of the header name with a second even byte/odd byte pair of the header name if the header name begins at an odd byte from a beginning point of the header of the network packet.
14 . The method of claim 13 , wherein an odd byte/even byte pair is an odd byte followed by an even byte.
15 . The method of claim 13 , wherein an even byte/odd byte pair is an even byte followed by an odd byte.
16 . An apparatus comprising:
a memory; and
one or more processors configured to:
swap a first odd byte/even byte pair of a cookie header name with a second odd byte/even byte pair of the cookie header name if the cookie header name begins at an even byte from a beginning point of a header of a network request packet; and
swap a first even byte/odd byte pair of the cookie header name with a second even byte/odd byte pair of the cookie header name if the cookie header name begins at an odd byte from a beginning point of the header of the network request packet.
17 . An apparatus comprising:
a memory; and
one or more processors configured to:
swap a first odd byte/even byte pair of a cookie name with a second odd byte/even byte pair of the cookie name if the cookie name begins at an even byte from a beginning point of a header of a network request packet; and
swap a first even byte/odd byte pair of the cookie name with a second even byte/odd byte pair of the cookie name if the cookie name begins at an odd byte from a beginning point of the header of the network request packet.
18 . An apparatus comprising:
a memory; and
one or more processors configured to:
swap a first odd byte/even byte pair of a cookie header name with a second odd byte/even byte pair of the cookie header name if the cookie header name begins at an even byte from a beginning point of a header of a network request packet and if the cookie is an only cookie in a cookie header in the network request packet;
swap a first even byte/odd byte pair of the cookie header name with a second even byte/odd byte pair of the cookie header name if the cookie header name begins at an odd byte from a beginning point of the header of the network request packet and if the cookie is the only cookie in a cookie header in the network request packet;
swap a first odd byte/even byte pair of the cookie name with a second odd byte/even byte pair of the cookie name if the cookie name begins at an even byte from a beginning point of the header of the network request packet and if the cookie is one of a plurality of cookies in the network request packet; and
swap a first even byte/odd byte pair of the cookie name with a second even byte/odd byte pair of the cookie name if the cookie name begins at an odd byte from a beginning point of the header of the network request packet and if the cookie is one of a plurality of cookies in the network request packet.