PHP2Go PHP Cross Reference Developer Tools

Source: /core/net/httpConstants.php - 221 lines - 6317 bytes - Text - Print

Description: PHP2Go Web Development Framework Copyright (c) 2002-2007 Marcos Pont

   1  <?php
   2  /**

   3   * PHP2Go Web Development Framework

   4   *

   5   * Copyright (c) 2002-2007 Marcos Pont

   6   *

   7   * LICENSE:

   8   *

   9   * This library is free software; you can redistribute it

  10   * and/or modify it under the terms of the GNU Lesser General

  11   * Public License as published by the Free Software Foundation;

  12   * either version 2.1 of the License, or (at your option) any

  13   * later version.

  14   *

  15   * This library is distributed in the hope that it will be useful,

  16   * but WITHOUT ANY WARRANTY; without even the implied warranty of

  17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

  18   * Lesser General Public License for more details.

  19   *

  20   * You should have received a copy of the GNU Lesser General Public

  21   * License along with this library; if not, write to the Free Software

  22   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  23   *

  24   * @author Marcos Pont <mpont@users.sourceforge.net>

  25   * @copyright 2002-2007 Marcos Pont

  26   * @license http://www.opensource.org/licenses/lgpl-license.php LGPL

  27   * @package net

  28   * @version $Id$

  29   */
  30  
  31  /**

  32   * Default HTTP port

  33   */
  34  define('HTTP_DEFAULT_PORT', 80);
  35  
  36  /**

  37   * Default HTTP connection timeout

  38   */
  39  define('HTTP_DEFAULT_TIMEOUT', 10);
  40  
  41  /**

  42   * HTTP line end characters

  43   */
  44  define('HTTP_CRLF', "\r\n");
  45  
  46  /**

  47   * Only a part of the request has been received by the server, but as long as it has not been rejected, the client should continue with the request

  48   */
  49  define('HTTP_STATUS_CONTINUE', 100);
  50  
  51  /**

  52   * The server switches protocol

  53   */
  54  define('HTTP_STATUS_SWITCHING_PROTOCOLS', 101);
  55  
  56  /**

  57   * The request is OK

  58   */
  59  define('HTTP_STATUS_OK', 200);
  60  
  61  /**

  62   * The request is complete, and a new resource is created

  63   */
  64  define('HTTP_STATUS_CREATED', 201);
  65  
  66  /**

  67   * The request is accepted for processing, but the processing is not complete

  68   */
  69  define('HTTP_STATUS_ACCEPTED', 202);
  70  
  71  /**

  72   * The returned metainformation in the entity-header is not the definitive set as available from the origin server

  73   */
  74  define('HTTP_STATUS_NON_AUTHORITATIVE', 203);
  75  
  76  /**

  77   * The server has fulfilled the request but does not need to return an entity-body

  78   */
  79  define('HTTP_STATUS_NO_CONTENT', 204);
  80  
  81  /**

  82   * The user agent should reset the document view which caused the request to be sent

  83   */
  84  define('HTTP_STATUS_RESET_CONTENT', 205);
  85  
  86  /**

  87   * The server has fulfilled the partial GET request for the resource

  88   */
  89  define('HTTP_STATUS_PARTIAL_CONTENT', 206);
  90  
  91  /**

  92   * The requested resource corresponds to any one of a set of representations, each with its own specific location

  93   */
  94  define('HTTP_STATUS_MULTIPLE_CHOICES', 300);
  95  
  96  /**

  97   * The requested resource has been assigned a new permanent URI

  98   */
  99  define('HTTP_STATUS_MOVED_PERMANENTLY', 301);
 100  
 101  /**

 102   * The requested resource resides temporarily under a different URI

 103   */
 104  define('HTTP_STATUS_FOUND',302);
 105  
 106  /**

 107   * The response to the request can be found under a different URI and should be retrieved using GET

 108   */
 109  define('HTTP_STATUS_SEE_OTHER', 303);
 110  
 111  /**

 112   * Indicates that the requested resource is not modified

 113   */
 114  define('HTTP_STATUS_NOT_MODIFIED', 304);
 115  
 116  /**

 117   * The requested resource must be accessed through the proxy given by the Location field

 118   */
 119  define('HTTP_STATUS_USE_PROXY', 305);
 120  
 121  /**

 122   * The requested resource resides temporarily under a different URI

 123   */
 124  define('HTTP_STATUS_TEMPORARY_REDIRECT', 307);
 125  
 126  /**

 127   * The request could not be understood by the server due to malformed syntax

 128   */
 129  define('HTTP_STATUS_BAD_REQUEST', 400);
 130  
 131  /**

 132   * The request requires user authentication

 133   */
 134  define('HTTP_STATUS_UNAUTHORIZED', 401);
 135  
 136  /**

 137   * The server understood the request, but is refusing to fulfill it

 138   */
 139  define('HTTP_STATUS_FORBIDDEN', 403);
 140  
 141  /**

 142   * The server has not found anything matching the Request-URI

 143   */
 144  define('HTTP_STATUS_NOT_FOUND', 404);
 145  
 146  /**

 147   * The method specified in the Request-Line is not allowed for the resource identified by the Request-URI

 148   */
 149  define('HTTP_STATUS_METHOD_NOT_ALLOWED', 405);
 150  
 151  /**

 152   * The resource is not acceptable according to the request headers

 153   */
 154  define('HTTP_STATUS_NOT_ACCEPTABLE', 406);
 155  
 156  /**

 157   * This code is similar to 401, but indicates that the client must first authenticate itself with the proxy

 158   */
 159  define('HTTP_STATUS_PROXY_AUTH_REQUIRED', 407);
 160  
 161  /**

 162   * The client did not produce a request within the time that the server was prepared to wait

 163   */
 164  define('HTTP_STATUS_REQUEST_TIMEOUT', 408);
 165  
 166  /**

 167   * The request could not be completed due to a conflict with the current state of the resource

 168   */
 169  define('HTTP_STATUS_CONFLICT', 409);
 170  
 171  /**

 172   * The requested resource is no longer available at the server and no forwarding address is known

 173   */
 174  define('HTTP_STATUS_GONE', 410);
 175  
 176  /**

 177   * The server refuses to accept the request without a defined Content-Length

 178   */
 179  define('HTTP_STATUS_LENGTH_REQUIRED', 411);
 180  
 181  /**

 182   * The server is refusing to process a request because the request entity is larger than the server is willing or able to process

 183   */
 184  define('HTTP_STATUS_REQUEST_TOO_LARGE', 413);
 185  
 186  /**

 187   * The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret

 188   */
 189  define('HTTP_STATUS_URI_TOO_LONG', 414);
 190  
 191  /**

 192   * The server encountered an unexpected condition which prevented it from fulfilling the request

 193   */
 194  define('HTTP_STATUS_SERVER_ERROR', 500);
 195  
 196  /**

 197   * The server does not support the functionality required to fulfill the request

 198   */
 199  define('HTTP_STATUS_NOT_IMPLEMENTED', 501);
 200  
 201  /**

 202   * The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request

 203   */
 204  define('HTTP_STATUS_BAD_GATEWAY', 502);
 205  
 206  /**

 207   * The server is currently unable to handle the request due to a temporary overloading or maintenance of the server

 208   */
 209  define('HTTP_STATUS_SERVICE_UNAVAILABLE', 503);
 210  
 211  /**

 212   * The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server

 213   */
 214  define('HTTP_STATUS_GATEWAY_TIMEOUT', 504);
 215  
 216  /**

 217   * The server does not support, or refuses to support, the HTTP protocol version that was used in the request message

 218   */
 219  define('HTTP_STATUS_VERSION_NOT_SUPPORTED',    505);
 220  
 221  ?>

title

Description

title

Description

title

Description

title

title

Body