web-server-xexp-misc.rkt
#lang racket/base
;; Copyright Neil Van Dyke.  See file "info.rkt".

(require (for-syntax racket/base)
         syntax/parse)

(provide ordering-sc)
(define-syntax-class ordering-sc
  #:description "ordering (identifier `any', `evaluation', or `writes-and-evaluation')"
  (pattern (~or (~datum any)
                (~datum evaluation)
                (~datum writes-and-evaluation))))

(provide xexp-sc)
(define-syntax-class xexp-sc
  #:description "html-template SXML/xexp part"
  (pattern (X ...))
  (pattern S:str))
  
(provide %web-server-xexp:http-code-to-message-bytes-hash)
(define %web-server-xexp:http-code-to-message-bytes-hash
  #hasheq((100 . #"Continue")
          (200 . #"OK")
          (300 . #"Multiple Choices")
          (400 . #"Bad Request")
          (500 . #"Internal Server Error")
          (101 . #"Switching Protocols")
          (201 . #"Created")
          (301 . #"Moved Permanently")
          (401 . #"Unauthorized")
          (501 . #"Not Implemented")
          (202 . #"Accepted")
          (302 . #"Found")
          (402 . #"Payment Required")
          (502 . #"Bad Gateway")
          (203 . #"Non-Authoritative Information")
          (303 . #"See Other")
          (403 . #"Forbidden")
          (503 . #"Service Unavailable")
          (204 . #"No Content")
          (304 . #"Not Modified")
          (404 . #"Not Found")
          (504 . #"Gateway Timeout")
          (205 . #"Reset Content")
          (305 . #"Use Proxy")
          (405 . #"Method Not Allowed")
          (505 . #"HTTP Version Not Supported")
          (206 . #"Partial Content")
          (306 . #"(Unused)")
          (406 . #"Not Acceptable")
          (307 . #"Temporary Redirect")
          (407 . #"Proxy Authentication Required")
          (408 . #"Request Timeout")
          (409 . #"Conflict")
          (410 . #"Gone")
          (411 . #"Length Required")
          (412 . #"Precondition Failed")
          (413 . #"Request Entity Too Large")
          (414 . #"Request-URI Too Long")
          (415 . #"Unsupported Media Type")
          (416 . #"Requested Range Not Satisfiable")
          (417 . #"Expectation Failed")))