449 Status Code Correlation and Application Example

Source: Internet
Author: User

Source: Ghost blog

Ghost Note: I first saw it in sobiny two days ago. Later I saw the related code in lcx. Now I have written another php version in 7j.
Summary

I. Talk about 449
Author: sobiny [B. c. t]
Source: Http://sobiny.cn

HTTP status code
We often see about 200,404,500.

So what is the status code 449?
Description on MSDN:
Retry after doing the appropriate action

GOOGLE online translation:
Make appropriate actions after retrial

Haha, after testing, the response after the IE browser receives the HTTP status code 449 is:
First, like the normal HTML execution, the information returned by 449 is first executed.
Then, the system automatically browses the currently submitted page.
Other browsers are not tested. The same is probably true. Otherwise, it is a browser BUG, because this is a normal HTTP status header.

In various dynamic scripts, the status code seems to be quite effective.
You can use JS to collect COOKIES and other things before executing the page ..
Or verify the user's information.
I'm not sure I want to think about the Trojan.

There are simple implementation methods in ASP.
PHP only needs to set the HTTP status header.

However, the sample code is not provided here.

Asp href = "http://sobiny.cn/6.asp" target = _ blank> Http://sobiny.cn/6.asp

Test page

Ii. 449 status code application example
Lcx version
Source: vbs small shop <%
If session ("test") = "" then
Session ("test") = ""
%>
<Html>
<Script language = jscript>
Alert (1 );
</Script>
</Html>
<%
Response. Status = "449"
Else
Session ("test") = ""
%>
<Html>
</Html>
<%
End if
%>
======================= Cookies <%
Dim Num
Num = Request. Cookies ("Visit_num ")
If num = "" Then
Num = 1
Response. Cookies ("Visit_num") = num
%>
<Html>
<Script language = jscript>
Alert (1 );
</Script>
</Html>
<%
Response. Status = "449"
Else
Num = num + 1
Response. Cookies ("Visit_num") = num
End if

If num> 1 Then
Response. Status = "200"
Response. Cookies ("Visit_num") = ""
End if

%> ================

=============================== Another ie bug <script type = "text/jscript">
Function init (){
Document. write ("The time is:" + Date ());

}
Window. onload = init;
</Script> ------------------------------------------------------------------------

PHP version of 7j
Source: 7 jdgs Blog <?
$ Thepass = helloword;
If (! Isset ($ _ COOKIE [webserver]) {
Setcookie ("webserver", $ thepass, time () + (1*24*3600 ));
Header ("HTTP/1.1 449 Retry ");
Echo "<script language = jscript> alert (1); </script> ";
}
Echo "</Html> ";
?>

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.