Ticket #1069: http-status-codes-rvdh.patch

File http-status-codes-rvdh.patch, 2.7 KB (added by RvdH, 8 years ago)
  • intarweb.scm

     
    756756                             'unknown-status 'status status))
    757757    (values (car s) (cdr s))))
    758758
    759 ;; XXX TODO: Include the full list of codes?  It can be found at
     759;; List of HTTP status codes based on:
    760760;; http://www.iana.org/assignments/http-status-codes/http-status-codes.xml
    761761(define http-status-codes
    762762  (make-parameter
    763763   `((continue . (100 . "Continue"))
    764764     (switching-protocols . (101 . "Switching Protocols"))
     765     (processing . (102 . "Processing"))
    765766     (ok . (200 . "OK"))
    766767     (created . (201 . "Created"))
    767768     (accepted . (202 . "Accepted"))
     
    769770     (no-content . (204 . "No Content"))
    770771     (reset-content . (205 . "Reset Content"))
    771772     (partial-content . (206 . "Partial Content"))
     773     (multi-status . (207 . "Multi-Status"))
     774     (already-reported . (208 . "Already Reported"))
     775     (im-used . (226 . "IM Used"))
    772776     (multiple-choices . (300 . "Multiple Choices"))
    773777     (moved-permanently . (301 . "Moved Permanently"))
    774778     (found . (302 . "Found"))
     
    792796     (request-entity-too-large . (413 . "Request Entity Too Large"))
    793797     (request-uri-too-large . (414 . "Request-URI Too Large"))
    794798     (unsupported-media-type . (415 . "Unsupported Media Type"))
    795      (request-range-not-satisfiable . (416 . "Requested range not satisfiable"))
     799     (requested-range-not-satisfiable . (416 . "Requested Range Not Satisfiable"))
    796800     (expectation-failed . (417 . "Expectation Failed"))
     801     (unprocessable-entity . (422 . "Unprocessable Entity"))
     802     (locked . (423 . "Locked"))
     803     (failed-dependency . (424 . "Failed Dependency"))
     804     (upgrade-required . (426 . "Upgrade Required"))
     805     (precondition-required . (428 . "Precondition Required"))
     806     (too-many-requests . (429 . "Too Many Requests"))
     807     (request-header-fields-too-large . (431 . "Request Header Fields Too Large"))
    797808     (internal-server-error . (500 . "Internal Server Error"))
    798809     (not-implemented . (501 . "Not Implemented"))
    799810     (bad-gateway . (502 . "Bad Gateway"))
    800811     (service-unavailable . (503 . "Service Unavailable"))
    801812     (gateway-time-out . (504 . "Gateway Time-out"))
    802      (http-version-not-supported . (505 . "HTTP Version not supported")))))
     813     (http-version-not-supported . (505 . "HTTP Version Not Supported"))
     814     (insufficient-storage . (507 . "Insufficient Storage"))
     815     (loop-detected . (508 . "Loop Detected"))
     816     (not-extended . (510 . "Not Extended"))
     817     (network-authentication-required . (511 . "Network Authentication Required")))))
    803818
    804819(define (http-0.9-response-unparser response)
    805820  response) ;; The response-body will just follow