Anonymous avatar Anonymous committed eb71e50

docstring fixes

Comments (0)

Files changed (2)

src/webmachine_dispatcher.erl

 split_host(HostAsString) ->
     string:tokens(HostAsString, ".").
 
-%% @type matchterm() = hostmatchterm() | pathmatchterm()
+%% @type matchterm() = hostmatchterm() | pathmatchterm().
 % The dispatch configuration is a list of these terms, and the
 % first one whose host and path terms match the input is used.
 % Using a pathmatchterm() here is equivalent to using a hostmatchterm()
 % of the form {{['*'],'*'}, [pathmatchterm()]}.
 
-%% @type hostmatchterm() = {hostmatch(), [pathmatchterm()]}
+%% @type hostmatchterm() = {hostmatch(), [pathmatchterm()]}.
 % The dispatch configuration contains a list of these terms, and the
 % first one whose host and one pathmatchterm match is used.
 
-%% @type hostmatch() = [hostterm()] | {[hostterm()], portterm()}
+%% @type hostmatch() = [hostterm()] | {[hostterm()], portterm()}.
 % A host header (Host, X-Forwarded-For, etc.) will be matched against
 % this term.  Using a raws [hostterm()] list is equivalent to using
 % {[hostterm()], '*'}.
 
-%% @type hostterm() = '*' | string() | atom()
+%% @type hostterm() = '*' | string() | atom().
 % A list of hostterms is matched against a '.'-separated hostname.
 % The '*' hosterm matches all remaining tokens, and is only allowed at
 % the head of the list.
 % Any atom hostterm other than '*' will match any token and will
 % create a binding in the result if a complete match occurs.
 
-%% @type portterm() = '*' | integer() | atom()
+%% @type portterm() = '*' | integer() | atom().
 % A portterm is matched against the integer port after any ':' in
 % the hostname, or 80 if no port is found.
 % The '*' portterm patches any port
          max_recv_body/1,set_max_recv_body/2,
          get_cookie_value/2,get_qs_value/2,get_qs_value/3,set_peer/2]).
 
+% @type reqdata(). The opaque data type used for req/resp data structures.
 -include_lib("include/wm_reqdata.hrl").
 
 create(Method,Version,RawPath,Headers) ->
 
 req_cookie(_RD = #wm_reqdata{req_cookie=C}) when is_list(C) -> C. % string
 
-req_qs(_RD = #wm_reqdata{req_qs=QS}) when is_list(QS) -> QS. % string
+%% @spec req_qs(reqdata()) -> [{Key, Value}]
+req_qs(_RD = #wm_reqdata{req_qs=QS}) when is_list(QS) -> QS.
 
 req_headers(_RD = #wm_reqdata{req_headers=ReqH}) -> ReqH. % mochiheaders
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.