http-parser.c

Small C library to parse HTTP requests
Log | Files | Refs | README | LICENSE

http-parser-statusses.h (2975B)


      1 #ifndef _HTTP_PARSER_STATUSSES_H_
      2 #define _HTTP_PARSER_STATUSSES_H_
      3 
      4 #ifdef __cplusplus
      5 extern "C" {
      6 #endif
      7 
      8 struct {
      9   int status;
     10   char *message;
     11 } http_parser_statusses[] = {
     12   { 100, "Continue" },
     13   { 101, "Switching Protocols" },
     14   { 102, "Processing" },
     15   { 103, "Early Hints" },
     16   { 200, "OK" },
     17   { 201, "Created" },
     18   { 202, "Accepted" },
     19   { 203, "Non-Authoritive Information" },
     20   { 204, "No Content" },
     21   { 205, "Reset Content" },
     22   { 206, "Partial Content" },
     23   { 207, "Multi-Status" },
     24   { 208, "Already Reported" },
     25   { 218, "This is fine" },
     26   { 226, "IM Used" },
     27   { 300, "Multiple Choices" },
     28   { 301, "Moved Permanently" },
     29   { 302, "Found" },
     30   { 303, "See Other" },
     31   { 304, "Not Modified" },
     32   { 305, "Use Proxy" },
     33   { 306, "Switch Proxy" },
     34   { 307, "Temporary Redirect" },
     35   { 308, "Permanent Redirect" },
     36   { 400, "Bad Request" },
     37   { 401, "Unauthorized" },
     38   { 402, "Payment Required" },
     39   { 403, "Forbidden" },
     40   { 404, "Not Found" },
     41   { 405, "Method Not Allowed" },
     42   { 406, "Not Acceptable" },
     43   { 407, "Proxy Authentication Required" },
     44   { 408, "Request Timeout" },
     45   { 409, "Conflict" },
     46   { 410, "Gone" },
     47   { 411, "Length Required" },
     48   { 412, "Precondition Failed" },
     49   { 413, "Payload Too Large" },
     50   { 414, "URI Too Long" },
     51   { 415, "Unsupported Media Type" },
     52   { 416, "Range Not Satisfiable" },
     53   { 417, "Expectation Failed" },
     54   { 418, "I'm a teapot" },
     55   { 419, "Page Expired" },
     56   { 420, "Enhance Your Calm" },
     57   { 421, "Misdirected Request" },
     58   { 422, "Unprocessable Entity" },
     59   { 423, "Locked" },
     60   { 424, "Failed Dependency" },
     61   { 425, "Too Early" },
     62   { 426, "Upgrade Required" },
     63   { 428, "Precondition Required" },
     64   { 429, "Too Many Requests" },
     65   { 431, "Request Header Fields Too Large" },
     66   { 440, "Login Time-out" },
     67   { 444, "No Response" },
     68   { 449, "Retry With" },
     69   { 450, "Blocked by Windows Parental Controls" },
     70   { 451, "Unavailable For Legal Reasons" },
     71   { 494, "Request header too large" },
     72   { 495, "SSL Certificate Error" },
     73   { 496, "SSL Certificate Required" },
     74   { 497, "HTTP Request Send to HTTPS Port" },
     75   { 498, "Invalid Token" },
     76   { 499, "Token Required" },
     77   { 500, "Internal Server Error" },
     78   { 501, "Not Implemented" },
     79   { 502, "Bad Gateway" },
     80   { 503, "Service Unavailable" },
     81   { 504, "Gateway Timeout" },
     82   { 505, "HTTP Version Not Supported" },
     83   { 506, "Variant Also Negotiates" },
     84   { 507, "Insufficient Storage" },
     85   { 509, "Bandwidth Limit Exceeded" },
     86   { 510, "Not Extended" },
     87   { 511, "Network Authentication Required" },
     88   { 520, "Web Server Returned an Unknown Error" },
     89   { 521, "Web Server is Down" },
     90   { 522, "Connection Timed Out" },
     91   { 523, "Origin is Unreachable" },
     92   { 524, "A Timeout Occurred" },
     93   { 525, "SSL Handshake Failed" },
     94   { 526, "Invalid SSL Certificate" },
     95   { 527, "Railgun Error" },
     96   { 530, "Site is frozen" },
     97   { 598, "Network read timeout error" },
     98   { 0,0 },
     99 };
    100 
    101 #ifdef __cplusplus
    102 } // extern "C"
    103 #endif
    104 
    105 #endif // _HTTP_PARSER_STATUSSES_H_