Add Response Status Code & Message
This commit is contained in:
parent
0ba09c2338
commit
cad925cc90
1 changed files with 25 additions and 5 deletions
|
@ -48,8 +48,8 @@ public class HttpWriter{
|
||||||
System.out.println(e[2]+" -> response "+code);
|
System.out.println(e[2]+" -> response "+code);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String[] HEIGHTBITS = new String[7];
|
private static String[] HEIGHTBITS = new String[9];
|
||||||
private static String[] NINEBITS = new String[206];
|
private static String[] NINEBITS = new String[212];
|
||||||
|
|
||||||
static {
|
static {
|
||||||
HEIGHTBITS[0] = " OK";
|
HEIGHTBITS[0] = " OK";
|
||||||
|
@ -59,13 +59,17 @@ public class HttpWriter{
|
||||||
HEIGHTBITS[4] = " No Content";
|
HEIGHTBITS[4] = " No Content";
|
||||||
HEIGHTBITS[5] = " Reset Content";
|
HEIGHTBITS[5] = " Reset Content";
|
||||||
HEIGHTBITS[6] = " Partial Content";
|
HEIGHTBITS[6] = " Partial Content";
|
||||||
|
HEIGHTBITS[7] = " Mutli-Status";
|
||||||
|
HEIGHTBITS[8] = " Already Reported";
|
||||||
|
|
||||||
NINEBITS[0] = " Multiple Choices";
|
NINEBITS[0] = " Multiple Choices";
|
||||||
NINEBITS[1] = " Moved Permanently";
|
NINEBITS[1] = " Moved Permanently";
|
||||||
NINEBITS[2] = " Temporary Redirect";
|
NINEBITS[2] = " Found";
|
||||||
NINEBITS[3] = " See Other";
|
NINEBITS[3] = " See Other";
|
||||||
NINEBITS[4] = " Not Modified";
|
NINEBITS[4] = " Not Modified";
|
||||||
NINEBITS[5] = " Use Proxy";
|
NINEBITS[5] = " Use Proxy";
|
||||||
|
NINEBITS[7] = " Temporary Redirect";
|
||||||
|
NINEBITS[8] = " Permanent Redirect";
|
||||||
|
|
||||||
NINEBITS[100] = " Bad Request";
|
NINEBITS[100] = " Bad Request";
|
||||||
NINEBITS[101] = " Unauthorized";
|
NINEBITS[101] = " Unauthorized";
|
||||||
|
@ -80,11 +84,22 @@ public class HttpWriter{
|
||||||
NINEBITS[110] = " Gone";
|
NINEBITS[110] = " Gone";
|
||||||
NINEBITS[111] = " Length Required";
|
NINEBITS[111] = " Length Required";
|
||||||
NINEBITS[112] = " Precondition Failed";
|
NINEBITS[112] = " Precondition Failed";
|
||||||
NINEBITS[113] = " Request Entity Too Large";
|
NINEBITS[113] = " Payload Too Large";
|
||||||
NINEBITS[114] = " Request-URI Too Large";
|
NINEBITS[114] = " URI Too Long";
|
||||||
NINEBITS[115] = " Unsupported Media Type";
|
NINEBITS[115] = " Unsupported Media Type";
|
||||||
|
NINEBITS[116] = " Range Not Satisfiable";
|
||||||
|
NINEBITS[117] = " Expectation Failed";
|
||||||
|
NINEBITS[118] = " I'm a Teapot";
|
||||||
|
NINEBITS[121] = " Misdirected Request";
|
||||||
|
NINEBITS[122] = " Unprocessable Content";
|
||||||
NINEBITS[123] = " Locked";
|
NINEBITS[123] = " Locked";
|
||||||
|
NINEBITS[124] = " Failed Dependency";
|
||||||
NINEBITS[125] = " Too Early";
|
NINEBITS[125] = " Too Early";
|
||||||
|
NINEBITS[126] = " Upgrade Required";
|
||||||
|
NINEBITS[128] = " Precondition Required";
|
||||||
|
NINEBITS[129] = " Too Many Requests";
|
||||||
|
NINEBITS[131] = " Request Header Fields Too Large";
|
||||||
|
NINEBITS[151] = " Unavailable For Legal Reasons";
|
||||||
|
|
||||||
NINEBITS[200] = " Internal Server Error";
|
NINEBITS[200] = " Internal Server Error";
|
||||||
NINEBITS[201] = " Not Implemented";
|
NINEBITS[201] = " Not Implemented";
|
||||||
|
@ -92,6 +107,11 @@ public class HttpWriter{
|
||||||
NINEBITS[203] = " Service Unavailable";
|
NINEBITS[203] = " Service Unavailable";
|
||||||
NINEBITS[204] = " Gateway Timeout";
|
NINEBITS[204] = " Gateway Timeout";
|
||||||
NINEBITS[205] = " HTTP Version Not Supported";
|
NINEBITS[205] = " HTTP Version Not Supported";
|
||||||
|
NINEBITS[206] = " Variant Also Negotiates";
|
||||||
|
NINEBITS[207] = " Insufficient Storage";
|
||||||
|
NINEBITS[208] = " Loop Detected";
|
||||||
|
NINEBITS[210] = " Not Extended";
|
||||||
|
NINEBITS[211] = " Network Authentication Required";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String codeMessage(int code){
|
private static String codeMessage(int code){
|
||||||
|
|
Loading…
Add table
Reference in a new issue