1----------------------------------------------------------------------------- 2-- Canonic header field capitalization 3-- LuaSocket toolkit. 4-- Author: Diego Nehab 5----------------------------------------------------------------------------- 6module("socket.headers") 7 8canonic = { 9 ["accept"] = "Accept", 10 ["accept-charset"] = "Accept-Charset", 11 ["accept-encoding"] = "Accept-Encoding", 12 ["accept-language"] = "Accept-Language", 13 ["accept-ranges"] = "Accept-Ranges", 14 ["action"] = "Action", 15 ["alternate-recipient"] = "Alternate-Recipient", 16 ["age"] = "Age", 17 ["allow"] = "Allow", 18 ["arrival-date"] = "Arrival-Date", 19 ["authorization"] = "Authorization", 20 ["bcc"] = "Bcc", 21 ["cache-control"] = "Cache-Control", 22 ["cc"] = "Cc", 23 ["comments"] = "Comments", 24 ["connection"] = "Connection", 25 ["content-description"] = "Content-Description", 26 ["content-disposition"] = "Content-Disposition", 27 ["content-encoding"] = "Content-Encoding", 28 ["content-id"] = "Content-ID", 29 ["content-language"] = "Content-Language", 30 ["content-length"] = "Content-Length", 31 ["content-location"] = "Content-Location", 32 ["content-md5"] = "Content-MD5", 33 ["content-range"] = "Content-Range", 34 ["content-transfer-encoding"] = "Content-Transfer-Encoding", 35 ["content-type"] = "Content-Type", 36 ["date"] = "Date", 37 ["diagnostic-code"] = "Diagnostic-Code", 38 ["dsn-gateway"] = "DSN-Gateway", 39 ["etag"] = "ETag", 40 ["expect"] = "Expect", 41 ["expires"] = "Expires", 42 ["final-log-id"] = "Final-Log-ID", 43 ["final-recipient"] = "Final-Recipient", 44 ["from"] = "From", 45 ["host"] = "Host", 46 ["if-match"] = "If-Match", 47 ["if-modified-since"] = "If-Modified-Since", 48 ["if-none-match"] = "If-None-Match", 49 ["if-range"] = "If-Range", 50 ["if-unmodified-since"] = "If-Unmodified-Since", 51 ["in-reply-to"] = "In-Reply-To", 52 ["keywords"] = "Keywords", 53 ["last-attempt-date"] = "Last-Attempt-Date", 54 ["last-modified"] = "Last-Modified", 55 ["location"] = "Location", 56 ["max-forwards"] = "Max-Forwards", 57 ["message-id"] = "Message-ID", 58 ["mime-version"] = "MIME-Version", 59 ["original-envelope-id"] = "Original-Envelope-ID", 60 ["original-recipient"] = "Original-Recipient", 61 ["pragma"] = "Pragma", 62 ["proxy-authenticate"] = "Proxy-Authenticate", 63 ["proxy-authorization"] = "Proxy-Authorization", 64 ["range"] = "Range", 65 ["received"] = "Received", 66 ["received-from-mta"] = "Received-From-MTA", 67 ["references"] = "References", 68 ["referer"] = "Referer", 69 ["remote-mta"] = "Remote-MTA", 70 ["reply-to"] = "Reply-To", 71 ["reporting-mta"] = "Reporting-MTA", 72 ["resent-bcc"] = "Resent-Bcc", 73 ["resent-cc"] = "Resent-Cc", 74 ["resent-date"] = "Resent-Date", 75 ["resent-from"] = "Resent-From", 76 ["resent-message-id"] = "Resent-Message-ID", 77 ["resent-reply-to"] = "Resent-Reply-To", 78 ["resent-sender"] = "Resent-Sender", 79 ["resent-to"] = "Resent-To", 80 ["retry-after"] = "Retry-After", 81 ["return-path"] = "Return-Path", 82 ["sender"] = "Sender", 83 ["server"] = "Server", 84 ["smtp-remote-recipient"] = "SMTP-Remote-Recipient", 85 ["status"] = "Status", 86 ["subject"] = "Subject", 87 ["te"] = "TE", 88 ["to"] = "To", 89 ["trailer"] = "Trailer", 90 ["transfer-encoding"] = "Transfer-Encoding", 91 ["upgrade"] = "Upgrade", 92 ["user-agent"] = "User-Agent", 93 ["vary"] = "Vary", 94 ["via"] = "Via", 95 ["warning"] = "Warning", 96 ["will-retry-until"] = "Will-Retry-Until", 97 ["www-authenticate"] = "WWW-Authenticate", 98 ["x-mailer"] = "X-Mailer", 99} 100