Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Defined client and server media types in matching algorithm section.
Browse files Browse the repository at this point in the history
  • Loading branch information
spericas committed Apr 27, 2015
1 parent bfcb588 commit 00c8ef0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ profile
*.tex~
*.thm
*.toc
spec.synctex.gz
1 change: 1 addition & 0 deletions chapters/changes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ \section{Changes Since 2.0 Final Release}

\begin{itemize}
\item Section \ref{resource_field}: Clarified exception handling for all 5 steps used to convert a string to a Param. Allowed the combination of \code{List<{\em T}>}, \code{Set<{\em T}>}, or \code{SortedSet<{\em T}>} and \ParamConverter.
\item Section \ref{request_matching}: Defined client and server media types.
\end{itemize}

\section{Changes Since 2.0 Proposed Final Draft}
Expand Down
5 changes: 4 additions & 1 deletion chapters/resources.tex
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ \subsection{Request Matching}

\newcommand{\bottom}{\perp}

\item If after filtering the set $M$ has more than one element, sort it in descending order as follows. Let a {\em client} media type be of the form $\mbox{$n$/$m$;q=$v_1$}$, a {\em server} media type be of the form $\mbox{$n$/$m$;qs=$v_2$}$ and a {\em combined} media type of the form $\mbox{$n$/$m$;q=$v_1$;qs=$v_2$;d=$v_3$}$, where the distance factor $d$ is defined below. For any of these types, $m$ could be $*$, or $m$ and $n$ could be $*$ and the values of q and qs are assumed to be $1.0$ if absent.
\item If after filtering the set $M$ has more than one element, sort it in descending order as follows. First, let us
define the {\em client} media type and the {\em server} media type as those denoted by the \code{Accept} header in
a request and the \code{@Produces} annotation on a resource method, respectively.
Let a client media type be of the form $\mbox{$n$/$m$;q=$v_1$}$, a server media type be of the form $\mbox{$n$/$m$;qs=$v_2$}$ and a {\em combined} media type of the form $\mbox{$n$/$m$;q=$v_1$;qs=$v_2$;d=$v_3$}$, where the distance factor $d$ is defined below. For any of these types, $m$ could be $*$, or $m$ and $n$ could be $*$ and the values of q and qs are assumed to be $1.0$ if absent.

Let $S(p_1, p_2)$ be defined over a client media type $p_1$ and a server media type $p_2$ as the function that returns the {\em most} specific combined type with a distance factor if $p_1$ and $p_2$ are compatible and $\bottom$ otherwise. For example:
\begin{itemize}
Expand Down
Binary file added spec.pdf
Binary file not shown.

0 comments on commit 00c8ef0

Please sign in to comment.