Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

123 lines (109 sloc) 4.973 kb
%% -*-erlang-*-
%
% Copyright © 2011 MLstate
%
% This file is part of OPA.
%
% OPA is free software: you can redistribute it and/or modify it under the
% terms of the GNU Affero General Public License, version 3, as published by
% the Free Software Foundation.
%
% OPA is distributed in the hope that it will be useful, but WITHOUT ANY
% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
% FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
% more details.
%
% You should have received a copy of the GNU Affero General Public License
% along with OPA. If not, see <http://www.gnu.org/licenses/>.
%
% IMPORTANT NOTE: It's a trap! You should change http_messages.proto
%% Request lines :
-raw RGet = "GET"i uri "HTTP/"it v "\r\n"
-raw RHead = "HEAD"i uri "HTTP/"it v "\r\n"
-raw RPost = "POST"i uri "HTTP/"it v "\r\n"
-raw RPut = "PUT"i uri "HTTP/"it v "\r\n"
-raw RDel = "DELETE"i uri "HTTP/"it v "\r\n"
-raw RTrace = "TRACE"i uri "HTTP/"it v "\r\n"
-raw RConn = "CONNECT"i uri "HTTP/"it v "\r\n"
-raw ROpts = "OPTIONS"i uri "HTTP/"it v "\r\n"
%%% Reponse <- Status line (header crlf)* crlf (Message body)?
%% Status-Line, v) = HTTP-Version SP Status-Code SP Reason-Phrase CRLF :
-raw RSl = "HTTP/" vs " " code int " " reason "\r\n"
%%%%%%%%%%%%%%%%%%%%%%%
%%% General headers %%%
%%%%%%%%%%%%%%%%%%%%%%%
-raw RCache_Control = "Cache-Control:"i str "\r\n"mt
-raw RConnection = "Connection:"i str "\r\n"mt
-raw RDate = "Date:"i str "\r\n"mt
-raw RPragma = "Pragma:"i str "\r\n"mt
-raw RTrailer = "Trailer:"i str "\r\n"mt
-raw RTransfer_Encoding = "Transfer-Encoding:"i str "\r\n"mt
-raw RUpgrade = "Upgrade:"i str "\r\n"mt
-raw RVia = "Via:"i str "\r\n"mt
-raw RWarning = "Warning:"i str "\r\n"mt
-raw RAllow = "Allow:"i str "\r\n"mt
%%%%%%%%%%%%%%%%%%%%%%
%%% Entity headers %%%
%%%%%%%%%%%%%%%%%%%%%%
-raw RContent_Encoding = "Content-Encoding:"i str "\r\n"mt
-raw RContent_Language = "Content-Language:"i str "\r\n"mt
-raw RContent_Length = "Content-Length:"i nb int64 "\r\n"mt
-raw RContent_Location = "Content-Location:"i str "\r\n"mt
-raw RContent_MD5 = "Content-MD5:"i str "\r\n"mt
-raw RContent_Range = "Content-Range:"i str "\r\n"mt
%-raw RContent_Type (str,lst : string list) = "Content-Type: " !"\r\n" !";" str (";" !";" !"\r\n" string)* as lst "\r\n"
-raw RContent_Type = "Content-Type:"i str ";" lst string list "\r\n"mt
%-raw RContent_Disposition (str,lst : string list) = "Content-Disposition: " !"\r\n" !";" str (";" !";" !"\r\n" string)* as lst "\r\n"
-raw RContent_Disposition = "Content-Disposition:"i str ";" lst string list "\r\n"mt
-raw RExpires = "Expires:"i str "\r\n"mt
-raw RLast_Modified = "Last-Modified:"i str "\r\n"mt
%%%%%%%%%%%%%%%%%%%%%%%%
%%% Requests headers %%%
%%%%%%%%%%%%%%%%%%%%%%%%
-raw RAccept = "Accept:"i str "\r\n"mt
-raw RAccept_Charset = "Accept-Charset:"i str "\r\n"mt
-raw RAccept_Encoding = "Accept-Encoding:"i str "\r\n"mt
-raw RAccept_Language = "Accept-Language:"i str "\r\n"mt
-raw RAuthorization = "Authorization:"i str "\r\n"mt
-raw RExpect = "Expect:"i str "\r\n"mt
-raw RFrom = "From:"i str "\r\n"mt
-raw RHost = "Host:"i str "\r\n"mt
-raw RIf_Match = "If-Match:"i str "\r\n"mt
-raw RIf_Modified_Since = "If-Modified-Since:"i str "\r\n"mt
-raw RIf_None_Match = "If-None-Match:"i str "\r\n"mt
-raw RIf_Range = "If-Range:"i str "\r\n"mt
-raw RIf_Unmodified_Since = "If-Unmodified-Since:"i str "\r\n"mt
-raw RKeep_Alive = "Keep-Alive:"i nb "\r\n"mt
-raw RMax_Forwards = "Max-Forwards:"i str "\r\n"mt
-raw RProxy_Authorization = "Proxy-Authorization:"i str "\r\n"mt
-raw RReqRange = "ReqRange:"i str "\r\n"mt
-raw RReferer = "Referer:"i str "\r\n"mt
-raw RTE = "TE:"i str "\r\n"mt
-raw RUser_Agent = "User-Agent:"i str "\r\n"mt
%%%%%%%%%%%%%%%%%%%%%%%%
%%% Response headers %%%
%%%%%%%%%%%%%%%%%%%%%%%%
-raw RAccept_Ranges = "Accept-Ranges:"i str "\r\n"mt
-raw RAge = "Age:"i str "\r\n"mt
-raw RETag = "ETag:"i str "\r\n"mt
-raw RLocation = "Location:"i str "\r\n"mt
-raw RProxy_Authenticate = "Proxy-Authenticate:"i str "\r\n"mt
-raw RRetry_After = "Retry-After:"i str "\r\n"mt
-raw RServer = "Server:"i str "\r\n"mt
-raw RVary = "Vary:"i str "\r\n"mt
-raw RWWW_Authenticate = "WWW-Authenticate:"i str "\r\n"mt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Uncategorised headers %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-raw RSet_Cookie = "Set-Cookie:"i str "\r\n"mt % (coded) server updates UA
-raw RCookie = "Cookie:"i str "\r\n"mt % (coded) UA returns to server
-raw RMyCookie = "MyCookie:"i id "=" str "\r\n"mt % (uncoded) server keeps internal id
-raw RSet_Cookie2 = "Set-Cookie2:"i str "\r\n"mt
-raw RCookie2 = "Cookie2:"i str "\r\n"mt
-raw ROrigin = "Origin:"i str "\r\n"mt
%-raw Rendboundary = "--" b string "--\r\n"
-raw Rboundary = "--" b string "\r\n"mt
-raw Rpartial = "" str string "\r\n"
-raw Rbody = "" str string ""
-raw Rcrlf = "\r\n"
-raw Rtest = "Test:" i int "\r\n" str2 string list "\r\n" (parse_hdr1,hdr1_to_string)
Jump to Line
Something went wrong with that request. Please try again.