Method and device for processing continuous redirection
First Claim
1. A method for processing continuous redirection, comprising:
- receiving a service request from a client, wherein the service request requires a redirection process comprising one or more redirections leading to a destination address;
counting a number of redirections that have been performed in response to the service request, wherein the counting comprises;
storing, in a memory, a correspondence relationship between a service ID corresponding to the service request and the number of redirections, wherein an initial value of the number of redirections is 0; and
for each redirection, adding 1 to the number of redirections corresponding to the service ID in the memory;
obtaining a pre-set threshold value associated with the service ID, wherein the obtaining comprises;
if error processing occurs when the number of redirections stored in the memory is smaller than the pre-set threshold value, adjusting the pre-set threshold value to the number of redirections corresponding to the service ID when the error processing occurs;
determining that the counted number of redirections is equal to or greater than the pre-set threshold value;
interrupting, based on the determining, the redirection process by sending an intermediate page to the client;
when the redirection process is interrupted, resetting the number of redirections corresponding to the service ID in the memory; and
resuming the redirection process by performing one or more remaining redirections, wherein the resuming comprises refreshing the intermediate page.
4 Assignments
0 Petitions
Accused Products
Abstract
Disclosed are a method and device for processing continuous redirection. The method comprises: when a service request that redirection processing needs to be performed is received, the number of redirections corresponding to the service request is determined and it is judged whether the number of redirections reaches a pre-set threshold value; if so, the redirection of the service request is interrupted, and after the redirection of the service request is interrupted, the service request is resumed redirecting to a destination address; and if not, the service request is redirected to the destination address. In the embodiments of the present application, a redirection processing device can avoid error processing (e.g. 404 error) induced by the case where the number of 302 redirections exceeds the number of times restricted by a browser and thus avoid service interruption and service failure, thereby improving the service experience and the user experience.
-
Citations
8 Claims
-
1. A method for processing continuous redirection, comprising:
-
receiving a service request from a client, wherein the service request requires a redirection process comprising one or more redirections leading to a destination address; counting a number of redirections that have been performed in response to the service request, wherein the counting comprises; storing, in a memory, a correspondence relationship between a service ID corresponding to the service request and the number of redirections, wherein an initial value of the number of redirections is 0; and for each redirection, adding 1 to the number of redirections corresponding to the service ID in the memory; obtaining a pre-set threshold value associated with the service ID, wherein the obtaining comprises; if error processing occurs when the number of redirections stored in the memory is smaller than the pre-set threshold value, adjusting the pre-set threshold value to the number of redirections corresponding to the service ID when the error processing occurs; determining that the counted number of redirections is equal to or greater than the pre-set threshold value; interrupting, based on the determining, the redirection process by sending an intermediate page to the client; when the redirection process is interrupted, resetting the number of redirections corresponding to the service ID in the memory; and resuming the redirection process by performing one or more remaining redirections, wherein the resuming comprises refreshing the intermediate page. - View Dependent Claims (2, 3, 4)
-
-
5. A system comprising a processor and a non-transitory computer-readable storage medium storing instructions executable by the processor to cause the system to perform operations comprising:
-
receiving a service request from a client, wherein the service request requires a redirection process comprising one or more redirections leading to a destination address; counting a number of redirections that have been performed in response to the service request, wherein the counting comprises; storing, in a memory, a correspondence relationship between a service ID corresponding to the service request and the number of redirections, wherein an initial value of the number of redirections is 0; and for each redirection, adding 1 to the number of redirections corresponding to the service ID in the memory; obtaining a pre-set threshold value associated with the service ID, wherein the obtaining comprises; if error processing occurs when the number of redirections stored in the memory is smaller than the pre-set threshold value, adjusting the pre-set threshold value to the number of redirections corresponding to the service ID when the error processing occurs; determining that the counted number of redirections is equal to or greater than a pre-set threshold value; interrupting, based on the determining, the redirection process by sending an intermediate page to the client; when the redirection process is interrupted, resetting the number of redirections corresponding to the service ID in the memory; and resuming the redirection process by performing one or more remaining redirections, wherein the resuming comprises refreshing the intermediate page. - View Dependent Claims (6, 7, 8)
-
Specification