http://git-wip-us.apache.org/repos/asf/mesos-site/blob/6b298f58/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2http_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2http_8hpp_source.html b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2http_8hpp_source.html index 9d26481..4dd7b60 100644 --- a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2http_8hpp_source.html +++ b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2http_8hpp_source.html @@ -542,635 +542,649 @@ <div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <a class="code" href="structprocess_1_1http_1_1CaseInsensitiveHash.html">CaseInsensitiveHash</a>,</div> <div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  <a class="code" href="structprocess_1_1http_1_1CaseInsensitiveEqual.html">CaseInsensitiveEqual</a>><a class="code" href="classprocess_1_1http_1_1Headers.html#ace314043b5f44f854097d321246a26c0">::get</a>(key);</div> <div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  }</div> -<div class="line"><a name="l00508"></a><span class="lineno"> 508</span> };</div> -<div class="line"><a name="l00509"></a><span class="lineno"> 509</span> </div> -<div class="line"><a name="l00510"></a><span class="lineno"> 510</span> </div> -<div class="line"><a name="l00511"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html"> 511</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Request.html">Request</a></div> -<div class="line"><a name="l00512"></a><span class="lineno"> 512</span> {</div> -<div class="line"><a name="l00513"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a09dda928f410e7d52b5f48cac8a59c4c"> 513</a></span>  <a class="code" href="structprocess_1_1http_1_1Request.html#a09dda928f410e7d52b5f48cac8a59c4c">Request</a>()</div> -<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  : <a class="code" href="structprocess_1_1http_1_1Request.html#a3a459e9dbce042511e6359533f6925d4">keepAlive</a>(false), <a class="code" href="structprocess_1_1http_1_1Request.html#a3297d5d7bfe13fbd732341433b70428c">type</a>(<a class="code" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74a25d7d2e078ea5bd01283be7cc227e071">BODY</a>) {}</div> -<div class="line"><a name="l00515"></a><span class="lineno"> 515</span> </div> -<div class="line"><a name="l00516"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a2e81202fca3244a7de00ac7bb253d59d"> 516</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Request.html#a2e81202fca3244a7de00ac7bb253d59d">method</a>;</div> +<div class="line"><a name="l00508"></a><span class="lineno"> 508</span> </div> +<div class="line"><a name="l00509"></a><span class="lineno"><a class="line" href="classprocess_1_1http_1_1Headers.html#afd463b216eeec49fdaa867b57a4a8885"> 509</a></span>  <a class="code" href="classprocess_1_1http_1_1Headers.html">Headers</a> <a class="code" href="classprocess_1_1http_1_1Headers.html#afd463b216eeec49fdaa867b57a4a8885">operator+</a>(<span class="keyword">const</span> <a class="code" href="classprocess_1_1http_1_1Headers.html">Headers</a>& that)<span class="keyword"> const</span></div> +<div class="line"><a name="l00510"></a><span class="lineno"> 510</span> <span class="keyword"> </span>{</div> +<div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <a class="code" href="classprocess_1_1http_1_1Headers.html">Headers</a> result = *<span class="keyword">this</span>;</div> +<div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  result.insert(that.begin(), that.end());</div> +<div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  <span class="keywordflow">return</span> result;</div> +<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  }</div> +<div class="line"><a name="l00515"></a><span class="lineno"> 515</span> };</div> +<div class="line"><a name="l00516"></a><span class="lineno"> 516</span> </div> <div class="line"><a name="l00517"></a><span class="lineno"> 517</span> </div> -<div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  <span class="comment">// TODO(benh): Add major/minor version.</span></div> -<div class="line"><a name="l00519"></a><span class="lineno"> 519</span> </div> -<div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  <span class="comment">// For client requests, the URL should be a URI.</span></div> -<div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  <span class="comment">// For server requests, the URL may be a URI or a relative reference.</span></div> -<div class="line"><a name="l00522"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#aba3024fe3e1028d19f5fb4e92519cb56"> 522</a></span>  <a class="code" href="structprocess_1_1http_1_1URL.html">URL</a> <a class="code" href="structprocess_1_1http_1_1Request.html#aba3024fe3e1028d19f5fb4e92519cb56">url</a>;</div> -<div class="line"><a name="l00523"></a><span class="lineno"> 523</span> </div> -<div class="line"><a name="l00524"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a53555a597f9376d2dd71daa799a90494"> 524</a></span>  <a class="code" href="classprocess_1_1http_1_1Headers.html">Headers</a> <a class="code" href="structprocess_1_1http_1_1Request.html#a53555a597f9376d2dd71daa799a90494">headers</a>;</div> -<div class="line"><a name="l00525"></a><span class="lineno"> 525</span> </div> -<div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  <span class="comment">// TODO(bmahler): Ensure this is consistent with the 'Connection'</span></div> -<div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  <span class="comment">// header; perhaps make this a function that checks the header.</span></div> -<div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  <span class="comment">//</span></div> -<div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  <span class="comment">// TODO(anand): Ideally, this could default to 'true' since</span></div> -<div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  <span class="comment">// persistent connections are the default since HTTP 1.1.</span></div> -<div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  <span class="comment">// Perhaps, we need to go from `keepAlive` to `closeConnection`</span></div> -<div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="comment">// to reflect the header more accurately, and to have an</span></div> -<div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  <span class="comment">// intuitive default of false.</span></div> -<div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="comment">//</span></div> -<div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  <span class="comment">// Default: false.</span></div> -<div class="line"><a name="l00536"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a3a459e9dbce042511e6359533f6925d4"> 536</a></span>  <span class="keywordtype">bool</span> <a class="code" href="structprocess_1_1http_1_1Request.html#a3a459e9dbce042511e6359533f6925d4">keepAlive</a>;</div> -<div class="line"><a name="l00537"></a><span class="lineno"> 537</span> </div> -<div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <span class="comment">// For server requests, this contains the address of the client.</span></div> -<div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <span class="comment">// Note that this may correspond to a proxy or load balancer address.</span></div> -<div class="line"><a name="l00540"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#ad0493ac04e37acf41127dfff3625c0f5"> 540</a></span>  <a class="code" href="classOption.html">Option<network::Address></a> <a class="code" href="structprocess_1_1http_1_1Request.html#ad0493ac04e37acf41127dfff3625c0f5">client</a>;</div> -<div class="line"><a name="l00541"></a><span class="lineno"> 541</span> </div> -<div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  <span class="comment">// Clients can choose to provide the entire body at once</span></div> -<div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  <span class="comment">// via BODY or can choose to stream the body over to the</span></div> -<div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  <span class="comment">// server via PIPE.</span></div> -<div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  <span class="comment">//</span></div> -<div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  <span class="comment">// Default: BODY.</span></div> -<div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  <span class="keyword">enum</span></div> -<div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  {</div> -<div class="line"><a name="l00549"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74a25d7d2e078ea5bd01283be7cc227e071"> 549</a></span>  <a class="code" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74a25d7d2e078ea5bd01283be7cc227e071">BODY</a>,</div> -<div class="line"><a name="l00550"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74aedad2ce668345260e1057f2fecd220c7"> 550</a></span>  <a class="code" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74aedad2ce668345260e1057f2fecd220c7">PIPE</a></div> -<div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  } <a class="code" href="structprocess_1_1http_1_1Request.html#a3297d5d7bfe13fbd732341433b70428c">type</a>;</div> -<div class="line"><a name="l00552"></a><span class="lineno"> 552</span> </div> -<div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  <span class="comment">// TODO(bmahler): Add a 'query' field which contains both</span></div> -<div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  <span class="comment">// the URL query and the parsed form data from the body.</span></div> -<div class="line"><a name="l00555"></a><span class="lineno"> 555</span> </div> -<div class="line"><a name="l00556"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a78dfcfa785afc80e221d92543ff617f1"> 556</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Request.html#a78dfcfa785afc80e221d92543ff617f1">body</a>;</div> -<div class="line"><a name="l00557"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a626643b560caa889b2d824f812447999"> 557</a></span>  <a class="code" href="classOption.html">Option<Pipe::Reader></a> <a class="code" href="structprocess_1_1http_1_1Request.html#a626643b560caa889b2d824f812447999">reader</a>;</div> -<div class="line"><a name="l00558"></a><span class="lineno"> 558</span> </div> -<div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  <span class="keywordtype">bool</span> <a class="code" href="structprocess_1_1http_1_1Request.html#ab73883ea45426022ec851b2069f8ed21">acceptsEncoding</a>(<span class="keyword">const</span> std::string& encoding) <span class="keyword">const</span>;</div> -<div class="line"><a name="l00564"></a><span class="lineno"> 564</span> </div> -<div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  <span class="keywordtype">bool</span> <a class="code" href="structprocess_1_1http_1_1Request.html#aa944870ad568bea5f0d0ce28763d0cef">acceptsMediaType</a>(<span class="keyword">const</span> std::string& mediaType) <span class="keyword">const</span>;</div> -<div class="line"><a name="l00570"></a><span class="lineno"> 570</span> </div> -<div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  <span class="keywordtype">bool</span> <a class="code" href="structprocess_1_1http_1_1Request.html#aa944870ad568bea5f0d0ce28763d0cef">acceptsMediaType</a>(</div> -<div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  <span class="keyword">const</span> std::string& <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>,</div> -<div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  <span class="keyword">const</span> std::string& mediaType) <span class="keyword">const</span>;</div> -<div class="line"><a name="l00580"></a><span class="lineno"> 580</span> </div> -<div class="line"><a name="l00581"></a><span class="lineno"> 581</span> <span class="keyword">private</span>:</div> -<div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  <span class="keywordtype">bool</span> _acceptsMediaType(</div> -<div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  <a class="code" href="classOption.html">Option<std::string></a> <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>,</div> -<div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  <span class="keyword">const</span> std::string& mediaType) <span class="keyword">const</span>;</div> -<div class="line"><a name="l00585"></a><span class="lineno"> 585</span> };</div> -<div class="line"><a name="l00586"></a><span class="lineno"> 586</span> </div> +<div class="line"><a name="l00518"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html"> 518</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Request.html">Request</a></div> +<div class="line"><a name="l00519"></a><span class="lineno"> 519</span> {</div> +<div class="line"><a name="l00520"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a09dda928f410e7d52b5f48cac8a59c4c"> 520</a></span>  <a class="code" href="structprocess_1_1http_1_1Request.html#a09dda928f410e7d52b5f48cac8a59c4c">Request</a>()</div> +<div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  : <a class="code" href="structprocess_1_1http_1_1Request.html#a3a459e9dbce042511e6359533f6925d4">keepAlive</a>(false), <a class="code" href="structprocess_1_1http_1_1Request.html#a3297d5d7bfe13fbd732341433b70428c">type</a>(<a class="code" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74a25d7d2e078ea5bd01283be7cc227e071">BODY</a>) {}</div> +<div class="line"><a name="l00522"></a><span class="lineno"> 522</span> </div> +<div class="line"><a name="l00523"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a2e81202fca3244a7de00ac7bb253d59d"> 523</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Request.html#a2e81202fca3244a7de00ac7bb253d59d">method</a>;</div> +<div class="line"><a name="l00524"></a><span class="lineno"> 524</span> </div> +<div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  <span class="comment">// TODO(benh): Add major/minor version.</span></div> +<div class="line"><a name="l00526"></a><span class="lineno"> 526</span> </div> +<div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  <span class="comment">// For client requests, the URL should be a URI.</span></div> +<div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  <span class="comment">// For server requests, the URL may be a URI or a relative reference.</span></div> +<div class="line"><a name="l00529"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#aba3024fe3e1028d19f5fb4e92519cb56"> 529</a></span>  <a class="code" href="structprocess_1_1http_1_1URL.html">URL</a> <a class="code" href="structprocess_1_1http_1_1Request.html#aba3024fe3e1028d19f5fb4e92519cb56">url</a>;</div> +<div class="line"><a name="l00530"></a><span class="lineno"> 530</span> </div> +<div class="line"><a name="l00531"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a53555a597f9376d2dd71daa799a90494"> 531</a></span>  <a class="code" href="classprocess_1_1http_1_1Headers.html">Headers</a> <a class="code" href="structprocess_1_1http_1_1Request.html#a53555a597f9376d2dd71daa799a90494">headers</a>;</div> +<div class="line"><a name="l00532"></a><span class="lineno"> 532</span> </div> +<div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  <span class="comment">// TODO(bmahler): Ensure this is consistent with the 'Connection'</span></div> +<div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="comment">// header; perhaps make this a function that checks the header.</span></div> +<div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  <span class="comment">//</span></div> +<div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="comment">// TODO(anand): Ideally, this could default to 'true' since</span></div> +<div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <span class="comment">// persistent connections are the default since HTTP 1.1.</span></div> +<div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <span class="comment">// Perhaps, we need to go from `keepAlive` to `closeConnection`</span></div> +<div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <span class="comment">// to reflect the header more accurately, and to have an</span></div> +<div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  <span class="comment">// intuitive default of false.</span></div> +<div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  <span class="comment">//</span></div> +<div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  <span class="comment">// Default: false.</span></div> +<div class="line"><a name="l00543"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a3a459e9dbce042511e6359533f6925d4"> 543</a></span>  <span class="keywordtype">bool</span> <a class="code" href="structprocess_1_1http_1_1Request.html#a3a459e9dbce042511e6359533f6925d4">keepAlive</a>;</div> +<div class="line"><a name="l00544"></a><span class="lineno"> 544</span> </div> +<div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  <span class="comment">// For server requests, this contains the address of the client.</span></div> +<div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  <span class="comment">// Note that this may correspond to a proxy or load balancer address.</span></div> +<div class="line"><a name="l00547"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#ad0493ac04e37acf41127dfff3625c0f5"> 547</a></span>  <a class="code" href="classOption.html">Option<network::Address></a> <a class="code" href="structprocess_1_1http_1_1Request.html#ad0493ac04e37acf41127dfff3625c0f5">client</a>;</div> +<div class="line"><a name="l00548"></a><span class="lineno"> 548</span> </div> +<div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  <span class="comment">// Clients can choose to provide the entire body at once</span></div> +<div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  <span class="comment">// via BODY or can choose to stream the body over to the</span></div> +<div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  <span class="comment">// server via PIPE.</span></div> +<div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  <span class="comment">//</span></div> +<div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  <span class="comment">// Default: BODY.</span></div> +<div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  <span class="keyword">enum</span></div> +<div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  {</div> +<div class="line"><a name="l00556"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74a25d7d2e078ea5bd01283be7cc227e071"> 556</a></span>  <a class="code" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74a25d7d2e078ea5bd01283be7cc227e071">BODY</a>,</div> +<div class="line"><a name="l00557"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74aedad2ce668345260e1057f2fecd220c7"> 557</a></span>  <a class="code" href="structprocess_1_1http_1_1Request.html#ad311ffe49352b401af89fb0e5e584f74aedad2ce668345260e1057f2fecd220c7">PIPE</a></div> +<div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  } <a class="code" href="structprocess_1_1http_1_1Request.html#a3297d5d7bfe13fbd732341433b70428c">type</a>;</div> +<div class="line"><a name="l00559"></a><span class="lineno"> 559</span> </div> +<div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  <span class="comment">// TODO(bmahler): Add a 'query' field which contains both</span></div> +<div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  <span class="comment">// the URL query and the parsed form data from the body.</span></div> +<div class="line"><a name="l00562"></a><span class="lineno"> 562</span> </div> +<div class="line"><a name="l00563"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a78dfcfa785afc80e221d92543ff617f1"> 563</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Request.html#a78dfcfa785afc80e221d92543ff617f1">body</a>;</div> +<div class="line"><a name="l00564"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Request.html#a626643b560caa889b2d824f812447999"> 564</a></span>  <a class="code" href="classOption.html">Option<Pipe::Reader></a> <a class="code" href="structprocess_1_1http_1_1Request.html#a626643b560caa889b2d824f812447999">reader</a>;</div> +<div class="line"><a name="l00565"></a><span class="lineno"> 565</span> </div> +<div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  <span class="keywordtype">bool</span> <a class="code" href="structprocess_1_1http_1_1Request.html#ab73883ea45426022ec851b2069f8ed21">acceptsEncoding</a>(<span class="keyword">const</span> std::string& encoding) <span class="keyword">const</span>;</div> +<div class="line"><a name="l00571"></a><span class="lineno"> 571</span> </div> +<div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  <span class="keywordtype">bool</span> <a class="code" href="structprocess_1_1http_1_1Request.html#aa944870ad568bea5f0d0ce28763d0cef">acceptsMediaType</a>(<span class="keyword">const</span> std::string& mediaType) <span class="keyword">const</span>;</div> +<div class="line"><a name="l00577"></a><span class="lineno"> 577</span> </div> +<div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  <span class="keywordtype">bool</span> <a class="code" href="structprocess_1_1http_1_1Request.html#aa944870ad568bea5f0d0ce28763d0cef">acceptsMediaType</a>(</div> +<div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  <span class="keyword">const</span> std::string& <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>,</div> +<div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  <span class="keyword">const</span> std::string& mediaType) <span class="keyword">const</span>;</div> <div class="line"><a name="l00587"></a><span class="lineno"> 587</span> </div> -<div class="line"><a name="l00588"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html"> 588</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00589"></a><span class="lineno"> 589</span> {</div> -<div class="line"><a name="l00590"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac7ac8132a8d8772335efd5a55d9ebb4f"> 590</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac7ac8132a8d8772335efd5a55d9ebb4f">Response</a>()</div> -<div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html#a00b3a2344f46dcb6868be6a7e962e091">type</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24aa49acb0a3f416b805cb49ec1a4549b14">NONE</a>)</div> -<div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  {}</div> +<div class="line"><a name="l00588"></a><span class="lineno"> 588</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  <span class="keywordtype">bool</span> _acceptsMediaType(</div> +<div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  <a class="code" href="classOption.html">Option<std::string></a> <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>,</div> +<div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  <span class="keyword">const</span> std::string& mediaType) <span class="keyword">const</span>;</div> +<div class="line"><a name="l00592"></a><span class="lineno"> 592</span> };</div> <div class="line"><a name="l00593"></a><span class="lineno"> 593</span> </div> -<div class="line"><a name="l00594"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ab52f93de73e86c37fa21484acd5d8e9d"> 594</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ab52f93de73e86c37fa21484acd5d8e9d">Response</a>(uint16_t _code)</div> -<div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html#a00b3a2344f46dcb6868be6a7e962e091">type</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24aa49acb0a3f416b805cb49ec1a4549b14">NONE</a>), <a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>(_code)</div> -<div class="line"><a name="l00596"></a><span class="lineno"> 596</span>  {</div> -<div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#a8fcbd2073ace160af24a9ee531cb4378">status</a> = <a class="code" href="structprocess_1_1http_1_1Status.html#a49f854c52adce69bc1d4cc5c15cdccac">Status::string</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>);</div> -<div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  }</div> -<div class="line"><a name="l00599"></a><span class="lineno"> 599</span> </div> -<div class="line"><a name="l00600"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ad23f61ad9a4ca2cbd074d1ee77170054"> 600</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1Response.html#ad23f61ad9a4ca2cbd074d1ee77170054">Response</a>(</div> -<div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  <span class="keyword">const</span> std::string& _body,</div> -<div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  uint16_t _code,</div> -<div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  <span class="keyword">const</span> std::string& contentType = <span class="stringliteral">"text/plain; charset=utf-8"</span>)</div> -<div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html#a00b3a2344f46dcb6868be6a7e962e091">type</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a7d2a4db1b1426c6caab18fa8b484f4f5">BODY</a>),</div> -<div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>(_body),</div> -<div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>(_code)</div> -<div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  {</div> -<div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"Content-Length"</span>] = <a class="code" href="namespacens.html#a28116b46e6543597a11733424cd1aa20">stringify</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>.size());</div> -<div class="line"><a name="l00609"></a><span class="lineno"> 609</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"Content-Type"</span>] = contentType;</div> -<div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#a8fcbd2073ace160af24a9ee531cb4378">status</a> = <a class="code" href="structprocess_1_1http_1_1Status.html#a49f854c52adce69bc1d4cc5c15cdccac">Status::string</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>);</div> -<div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  }</div> -<div class="line"><a name="l00612"></a><span class="lineno"> 612</span> </div> -<div class="line"><a name="l00613"></a><span class="lineno"> 613</span>  <span class="comment">// TODO(benh): Add major/minor version.</span></div> -<div class="line"><a name="l00614"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#a8fcbd2073ace160af24a9ee531cb4378"> 614</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Response.html#a8fcbd2073ace160af24a9ee531cb4378">status</a>;</div> -<div class="line"><a name="l00615"></a><span class="lineno"> 615</span> </div> -<div class="line"><a name="l00616"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab"> 616</a></span>  <a class="code" href="classprocess_1_1http_1_1Headers.html">Headers</a> <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>;</div> -<div class="line"><a name="l00617"></a><span class="lineno"> 617</span> </div> -<div class="line"><a name="l00618"></a><span class="lineno"> 618</span>  <span class="comment">// Either provide a 'body', an absolute 'path' to a file, or a</span></div> -<div class="line"><a name="l00619"></a><span class="lineno"> 619</span>  <span class="comment">// 'pipe' for streaming a response. Distinguish between the cases</span></div> -<div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  <span class="comment">// using 'type' below.</span></div> -<div class="line"><a name="l00621"></a><span class="lineno"> 621</span>  <span class="comment">//</span></div> -<div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  <span class="comment">// BODY: Uses 'body' as the body of the response. These may be</span></div> -<div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  <span class="comment">// encoded using gzip for efficiency, if 'Content-Encoding' is not</span></div> -<div class="line"><a name="l00624"></a><span class="lineno"> 624</span>  <span class="comment">// already specified.</span></div> -<div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  <span class="comment">//</span></div> -<div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  <span class="comment">// PATH: Attempts to perform a 'sendfile' operation on the file</span></div> -<div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  <span class="comment">// found at 'path'.</span></div> +<div class="line"><a name="l00594"></a><span class="lineno"> 594</span> </div> +<div class="line"><a name="l00595"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html"> 595</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> +<div class="line"><a name="l00596"></a><span class="lineno"> 596</span> {</div> +<div class="line"><a name="l00597"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac7ac8132a8d8772335efd5a55d9ebb4f"> 597</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac7ac8132a8d8772335efd5a55d9ebb4f">Response</a>()</div> +<div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html#a00b3a2344f46dcb6868be6a7e962e091">type</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24aa49acb0a3f416b805cb49ec1a4549b14">NONE</a>)</div> +<div class="line"><a name="l00599"></a><span class="lineno"> 599</span>  {}</div> +<div class="line"><a name="l00600"></a><span class="lineno"> 600</span> </div> +<div class="line"><a name="l00601"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ab52f93de73e86c37fa21484acd5d8e9d"> 601</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ab52f93de73e86c37fa21484acd5d8e9d">Response</a>(uint16_t _code)</div> +<div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html#a00b3a2344f46dcb6868be6a7e962e091">type</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24aa49acb0a3f416b805cb49ec1a4549b14">NONE</a>), <a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>(_code)</div> +<div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  {</div> +<div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#a8fcbd2073ace160af24a9ee531cb4378">status</a> = <a class="code" href="structprocess_1_1http_1_1Status.html#a49f854c52adce69bc1d4cc5c15cdccac">Status::string</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>);</div> +<div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  }</div> +<div class="line"><a name="l00606"></a><span class="lineno"> 606</span> </div> +<div class="line"><a name="l00607"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ad23f61ad9a4ca2cbd074d1ee77170054"> 607</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1Response.html#ad23f61ad9a4ca2cbd074d1ee77170054">Response</a>(</div> +<div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  <span class="keyword">const</span> std::string& _body,</div> +<div class="line"><a name="l00609"></a><span class="lineno"> 609</span>  uint16_t _code,</div> +<div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  <span class="keyword">const</span> std::string& contentType = <span class="stringliteral">"text/plain; charset=utf-8"</span>)</div> +<div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html#a00b3a2344f46dcb6868be6a7e962e091">type</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a7d2a4db1b1426c6caab18fa8b484f4f5">BODY</a>),</div> +<div class="line"><a name="l00612"></a><span class="lineno"> 612</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>(_body),</div> +<div class="line"><a name="l00613"></a><span class="lineno"> 613</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>(_code)</div> +<div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  {</div> +<div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"Content-Length"</span>] = <a class="code" href="namespacens.html#a28116b46e6543597a11733424cd1aa20">stringify</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>.size());</div> +<div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"Content-Type"</span>] = contentType;</div> +<div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#a8fcbd2073ace160af24a9ee531cb4378">status</a> = <a class="code" href="structprocess_1_1http_1_1Status.html#a49f854c52adce69bc1d4cc5c15cdccac">Status::string</a>(<a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>);</div> +<div class="line"><a name="l00618"></a><span class="lineno"> 618</span>  }</div> +<div class="line"><a name="l00619"></a><span class="lineno"> 619</span> </div> +<div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  <span class="comment">// TODO(benh): Add major/minor version.</span></div> +<div class="line"><a name="l00621"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#a8fcbd2073ace160af24a9ee531cb4378"> 621</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Response.html#a8fcbd2073ace160af24a9ee531cb4378">status</a>;</div> +<div class="line"><a name="l00622"></a><span class="lineno"> 622</span> </div> +<div class="line"><a name="l00623"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab"> 623</a></span>  <a class="code" href="classprocess_1_1http_1_1Headers.html">Headers</a> <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>;</div> +<div class="line"><a name="l00624"></a><span class="lineno"> 624</span> </div> +<div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  <span class="comment">// Either provide a 'body', an absolute 'path' to a file, or a</span></div> +<div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  <span class="comment">// 'pipe' for streaming a response. Distinguish between the cases</span></div> +<div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  <span class="comment">// using 'type' below.</span></div> <div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  <span class="comment">//</span></div> -<div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  <span class="comment">// PIPE: Splices data from the Pipe 'reader' using a "chunked"</span></div> -<div class="line"><a name="l00630"></a><span class="lineno"> 630</span>  <span class="comment">// 'Transfer-Encoding'. The writer uses a Pipe::Writer to</span></div> -<div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  <span class="comment">// perform writes and to detect a closed read-end of the Pipe</span></div> -<div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  <span class="comment">// (i.e. nobody is listening any longer). Once the writer is</span></div> -<div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  <span class="comment">// finished, it will close its end of the pipe to signal end</span></div> -<div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  <span class="comment">// of file to the Reader.</span></div> +<div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  <span class="comment">// BODY: Uses 'body' as the body of the response. These may be</span></div> +<div class="line"><a name="l00630"></a><span class="lineno"> 630</span>  <span class="comment">// encoded using gzip for efficiency, if 'Content-Encoding' is not</span></div> +<div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  <span class="comment">// already specified.</span></div> +<div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  <span class="comment">//</span></div> +<div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  <span class="comment">// PATH: Attempts to perform a 'sendfile' operation on the file</span></div> +<div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  <span class="comment">// found at 'path'.</span></div> <div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  <span class="comment">//</span></div> -<div class="line"><a name="l00636"></a><span class="lineno"> 636</span>  <span class="comment">// In all cases (BODY, PATH, PIPE), you are expected to properly</span></div> -<div class="line"><a name="l00637"></a><span class="lineno"> 637</span>  <span class="comment">// specify the 'Content-Type' header, but the 'Content-Length' and</span></div> -<div class="line"><a name="l00638"></a><span class="lineno"> 638</span>  <span class="comment">// or 'Transfer-Encoding' headers will be filled in for you.</span></div> -<div class="line"><a name="l00639"></a><span class="lineno"> 639</span>  <span class="keyword">enum</span></div> -<div class="line"><a name="l00640"></a><span class="lineno"> 640</span>  {</div> -<div class="line"><a name="l00641"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24aa49acb0a3f416b805cb49ec1a4549b14"> 641</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24aa49acb0a3f416b805cb49ec1a4549b14">NONE</a>,</div> -<div class="line"><a name="l00642"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a7d2a4db1b1426c6caab18fa8b484f4f5"> 642</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a7d2a4db1b1426c6caab18fa8b484f4f5">BODY</a>,</div> -<div class="line"><a name="l00643"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a069715e7afa526f4f971dcf3d704b5c8"> 643</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a069715e7afa526f4f971dcf3d704b5c8">PATH</a>,</div> -<div class="line"><a name="l00644"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a8d713d3c6326b2c6f5730c5f46f3e3f0"> 644</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a8d713d3c6326b2c6f5730c5f46f3e3f0">PIPE</a></div> -<div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  } <a class="code" href="structprocess_1_1http_1_1Response.html#a00b3a2344f46dcb6868be6a7e962e091">type</a>;</div> -<div class="line"><a name="l00646"></a><span class="lineno"> 646</span> </div> -<div class="line"><a name="l00647"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905"> 647</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>;</div> -<div class="line"><a name="l00648"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#aad42d5f8c85b81742de9f3f1a0f6d328"> 648</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Response.html#aad42d5f8c85b81742de9f3f1a0f6d328">path</a>;</div> -<div class="line"><a name="l00649"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#aa3543eb8ecd36f5d6d91b2640d471359"> 649</a></span>  <a class="code" href="classOption.html">Option<Pipe::Reader></a> <a class="code" href="structprocess_1_1http_1_1Response.html#aa3543eb8ecd36f5d6d91b2640d471359">reader</a>;</div> -<div class="line"><a name="l00650"></a><span class="lineno"> 650</span> </div> -<div class="line"><a name="l00651"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242"> 651</a></span>  uint16_t <a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>;</div> -<div class="line"><a name="l00652"></a><span class="lineno"> 652</span> };</div> +<div class="line"><a name="l00636"></a><span class="lineno"> 636</span>  <span class="comment">// PIPE: Splices data from the Pipe 'reader' using a "chunked"</span></div> +<div class="line"><a name="l00637"></a><span class="lineno"> 637</span>  <span class="comment">// 'Transfer-Encoding'. The writer uses a Pipe::Writer to</span></div> +<div class="line"><a name="l00638"></a><span class="lineno"> 638</span>  <span class="comment">// perform writes and to detect a closed read-end of the Pipe</span></div> +<div class="line"><a name="l00639"></a><span class="lineno"> 639</span>  <span class="comment">// (i.e. nobody is listening any longer). Once the writer is</span></div> +<div class="line"><a name="l00640"></a><span class="lineno"> 640</span>  <span class="comment">// finished, it will close its end of the pipe to signal end</span></div> +<div class="line"><a name="l00641"></a><span class="lineno"> 641</span>  <span class="comment">// of file to the Reader.</span></div> +<div class="line"><a name="l00642"></a><span class="lineno"> 642</span>  <span class="comment">//</span></div> +<div class="line"><a name="l00643"></a><span class="lineno"> 643</span>  <span class="comment">// In all cases (BODY, PATH, PIPE), you are expected to properly</span></div> +<div class="line"><a name="l00644"></a><span class="lineno"> 644</span>  <span class="comment">// specify the 'Content-Type' header, but the 'Content-Length' and</span></div> +<div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  <span class="comment">// or 'Transfer-Encoding' headers will be filled in for you.</span></div> +<div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  <span class="keyword">enum</span></div> +<div class="line"><a name="l00647"></a><span class="lineno"> 647</span>  {</div> +<div class="line"><a name="l00648"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24aa49acb0a3f416b805cb49ec1a4549b14"> 648</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24aa49acb0a3f416b805cb49ec1a4549b14">NONE</a>,</div> +<div class="line"><a name="l00649"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a7d2a4db1b1426c6caab18fa8b484f4f5"> 649</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a7d2a4db1b1426c6caab18fa8b484f4f5">BODY</a>,</div> +<div class="line"><a name="l00650"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a069715e7afa526f4f971dcf3d704b5c8"> 650</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a069715e7afa526f4f971dcf3d704b5c8">PATH</a>,</div> +<div class="line"><a name="l00651"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a8d713d3c6326b2c6f5730c5f46f3e3f0"> 651</a></span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ac8b9e44a3e44f148c14e81cbb9fafe24a8d713d3c6326b2c6f5730c5f46f3e3f0">PIPE</a></div> +<div class="line"><a name="l00652"></a><span class="lineno"> 652</span>  } <a class="code" href="structprocess_1_1http_1_1Response.html#a00b3a2344f46dcb6868be6a7e962e091">type</a>;</div> <div class="line"><a name="l00653"></a><span class="lineno"> 653</span> </div> -<div class="line"><a name="l00654"></a><span class="lineno"> 654</span> </div> -<div class="line"><a name="l00655"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html"> 655</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1OK.html">OK</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00656"></a><span class="lineno"> 656</span> {</div> -<div class="line"><a name="l00657"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html#af0ee20be64fc087545d5e44d0d59fc2f"> 657</a></span>  <a class="code" href="structprocess_1_1http_1_1OK.html#af0ee20be64fc087545d5e44d0d59fc2f">OK</a>() : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::<a class="code" href="structprocess_1_1http_1_1OK.html">OK</a>) {}</div> -<div class="line"><a name="l00658"></a><span class="lineno"> 658</span> </div> -<div class="line"><a name="l00659"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html#a0ae8b20f46ae7ce0243dfe7235bbb250"> 659</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1OK.html#a0ae8b20f46ae7ce0243dfe7235bbb250">OK</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> -<div class="line"><a name="l00660"></a><span class="lineno"> 660</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(std::string(body), <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::<a class="code" href="structprocess_1_1http_1_1OK.html">OK</a>) {}</div> +<div class="line"><a name="l00654"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905"> 654</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>;</div> +<div class="line"><a name="l00655"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#aad42d5f8c85b81742de9f3f1a0f6d328"> 655</a></span>  std::string <a class="code" href="structprocess_1_1http_1_1Response.html#aad42d5f8c85b81742de9f3f1a0f6d328">path</a>;</div> +<div class="line"><a name="l00656"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#aa3543eb8ecd36f5d6d91b2640d471359"> 656</a></span>  <a class="code" href="classOption.html">Option<Pipe::Reader></a> <a class="code" href="structprocess_1_1http_1_1Response.html#aa3543eb8ecd36f5d6d91b2640d471359">reader</a>;</div> +<div class="line"><a name="l00657"></a><span class="lineno"> 657</span> </div> +<div class="line"><a name="l00658"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242"> 658</a></span>  uint16_t <a class="code" href="structprocess_1_1http_1_1Response.html#ad6530fddd03380dbb3b23b17523cb242">code</a>;</div> +<div class="line"><a name="l00659"></a><span class="lineno"> 659</span> };</div> +<div class="line"><a name="l00660"></a><span class="lineno"> 660</span> </div> <div class="line"><a name="l00661"></a><span class="lineno"> 661</span> </div> -<div class="line"><a name="l00662"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html#a82a9276bdee5eb85723f8b651c1c3ebb"> 662</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1OK.html#a82a9276bdee5eb85723f8b651c1c3ebb">OK</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>) : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::<a class="code" href="structprocess_1_1http_1_1OK.html">OK</a>) {}</div> -<div class="line"><a name="l00663"></a><span class="lineno"> 663</span> </div> -<div class="line"><a name="l00664"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html#adb6550d4be6f18eedffea30d2f39faf6"> 664</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1OK.html#adb6550d4be6f18eedffea30d2f39faf6">OK</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>, <span class="keyword">const</span> std::string& contentType)</div> -<div class="line"><a name="l00665"></a><span class="lineno"> 665</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::<a class="code" href="structprocess_1_1http_1_1OK.html">OK</a>, contentType) {}</div> -<div class="line"><a name="l00666"></a><span class="lineno"> 666</span> </div> -<div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  <a class="code" href="structprocess_1_1http_1_1OK.html#af0ee20be64fc087545d5e44d0d59fc2f">OK</a>(<span class="keyword">const</span> <a class="code" href="structJSON_1_1Value.html">JSON::Value</a>& value, <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a>& jsonp = <a class="code" href="structNone.html">None</a>());</div> +<div class="line"><a name="l00662"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html"> 662</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1OK.html">OK</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> +<div class="line"><a name="l00663"></a><span class="lineno"> 663</span> {</div> +<div class="line"><a name="l00664"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html#af0ee20be64fc087545d5e44d0d59fc2f"> 664</a></span>  <a class="code" href="structprocess_1_1http_1_1OK.html#af0ee20be64fc087545d5e44d0d59fc2f">OK</a>() : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::<a class="code" href="structprocess_1_1http_1_1OK.html">OK</a>) {}</div> +<div class="line"><a name="l00665"></a><span class="lineno"> 665</span> </div> +<div class="line"><a name="l00666"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html#a0ae8b20f46ae7ce0243dfe7235bbb250"> 666</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1OK.html#a0ae8b20f46ae7ce0243dfe7235bbb250">OK</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> +<div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(std::string(body), <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::<a class="code" href="structprocess_1_1http_1_1OK.html">OK</a>) {}</div> <div class="line"><a name="l00668"></a><span class="lineno"> 668</span> </div> -<div class="line"><a name="l00669"></a><span class="lineno"> 669</span>  <a class="code" href="structprocess_1_1http_1_1OK.html#af0ee20be64fc087545d5e44d0d59fc2f">OK</a>(<a class="code" href="classJSON_1_1Proxy.html">JSON::Proxy</a>&& value, <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a>& jsonp = <a class="code" href="structNone.html">None</a>());</div> -<div class="line"><a name="l00670"></a><span class="lineno"> 670</span> };</div> -<div class="line"><a name="l00671"></a><span class="lineno"> 671</span> </div> -<div class="line"><a name="l00672"></a><span class="lineno"> 672</span> </div> -<div class="line"><a name="l00673"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Accepted.html"> 673</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Accepted.html">Accepted</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00674"></a><span class="lineno"> 674</span> {</div> -<div class="line"><a name="l00675"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Accepted.html#a44ee87e5b1bda7e30f5afbd709a0c25f"> 675</a></span>  <a class="code" href="structprocess_1_1http_1_1Accepted.html#a44ee87e5b1bda7e30f5afbd709a0c25f">Accepted</a>() : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::ACCEPTED) {}</div> -<div class="line"><a name="l00676"></a><span class="lineno"> 676</span> </div> -<div class="line"><a name="l00677"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Accepted.html#ac694c4b875e0d6e21ace64e82be1753c"> 677</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1Accepted.html#ac694c4b875e0d6e21ace64e82be1753c">Accepted</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> -<div class="line"><a name="l00678"></a><span class="lineno"> 678</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::ACCEPTED) {}</div> -<div class="line"><a name="l00679"></a><span class="lineno"> 679</span> };</div> -<div class="line"><a name="l00680"></a><span class="lineno"> 680</span> </div> -<div class="line"><a name="l00681"></a><span class="lineno"> 681</span> </div> -<div class="line"><a name="l00682"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1TemporaryRedirect.html"> 682</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1TemporaryRedirect.html">TemporaryRedirect</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00683"></a><span class="lineno"> 683</span> {</div> -<div class="line"><a name="l00684"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1TemporaryRedirect.html#adbbe7389179708e229d9a07071041fde"> 684</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1TemporaryRedirect.html#adbbe7389179708e229d9a07071041fde">TemporaryRedirect</a>(<span class="keyword">const</span> std::string& url)</div> -<div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::TEMPORARY_REDIRECT)</div> -<div class="line"><a name="l00686"></a><span class="lineno"> 686</span>  {</div> -<div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"Location"</span>] = url;</div> -<div class="line"><a name="l00688"></a><span class="lineno"> 688</span>  }</div> -<div class="line"><a name="l00689"></a><span class="lineno"> 689</span> };</div> -<div class="line"><a name="l00690"></a><span class="lineno"> 690</span> </div> -<div class="line"><a name="l00691"></a><span class="lineno"> 691</span> </div> -<div class="line"><a name="l00692"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1BadRequest.html"> 692</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1BadRequest.html">BadRequest</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00693"></a><span class="lineno"> 693</span> {</div> -<div class="line"><a name="l00694"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1BadRequest.html#a0c222100add3ed4f99754a7313ef0193"> 694</a></span>  <a class="code" href="structprocess_1_1http_1_1BadRequest.html#a0c222100add3ed4f99754a7313ef0193">BadRequest</a>() : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::BAD_REQUEST) {}</div> -<div class="line"><a name="l00695"></a><span class="lineno"> 695</span> </div> -<div class="line"><a name="l00696"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1BadRequest.html#a16f75cbcfe0161d83b8d66a250116e11"> 696</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1BadRequest.html#a16f75cbcfe0161d83b8d66a250116e11">BadRequest</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> -<div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::BAD_REQUEST) {}</div> -<div class="line"><a name="l00698"></a><span class="lineno"> 698</span> };</div> -<div class="line"><a name="l00699"></a><span class="lineno"> 699</span> </div> -<div class="line"><a name="l00700"></a><span class="lineno"> 700</span> </div> -<div class="line"><a name="l00701"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Unauthorized.html"> 701</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Unauthorized.html">Unauthorized</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00702"></a><span class="lineno"> 702</span> {</div> -<div class="line"><a name="l00703"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Unauthorized.html#a8d3b046c0080b2ba42674e8ba6261b99"> 703</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1Unauthorized.html#a8d3b046c0080b2ba42674e8ba6261b99">Unauthorized</a>(<span class="keyword">const</span> std::vector<std::string>& challenges)</div> -<div class="line"><a name="l00704"></a><span class="lineno"> 704</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::UNAUTHORIZED)</div> -<div class="line"><a name="l00705"></a><span class="lineno"> 705</span>  {</div> -<div class="line"><a name="l00706"></a><span class="lineno"> 706</span>  <span class="comment">// TODO(arojas): Many HTTP client implementations do not support</span></div> -<div class="line"><a name="l00707"></a><span class="lineno"> 707</span>  <span class="comment">// multiple challenges within a single 'WWW-Authenticate' header.</span></div> -<div class="line"><a name="l00708"></a><span class="lineno"> 708</span>  <span class="comment">// Once MESOS-3306 is fixed, we can use multiple entries for the</span></div> -<div class="line"><a name="l00709"></a><span class="lineno"> 709</span>  <span class="comment">// same header.</span></div> -<div class="line"><a name="l00710"></a><span class="lineno"> 710</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"WWW-Authenticate"</span>] = <a class="code" href="namespacestrings.html#ac315a6174f56cba0d8295f84da265416">strings::join</a>(<span class="stringliteral">", "</span>, challenges);</div> -<div class="line"><a name="l00711"></a><span class="lineno"> 711</span>  }</div> -<div class="line"><a name="l00712"></a><span class="lineno"> 712</span> </div> -<div class="line"><a name="l00713"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Unauthorized.html#a26a6377efd8016c73710937995f834f3"> 713</a></span>  <a class="code" href="structprocess_1_1http_1_1Unauthorized.html#a26a6377efd8016c73710937995f834f3">Unauthorized</a>(</div> -<div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  <span class="keyword">const</span> std::vector<std::string>& challenges,</div> -<div class="line"><a name="l00715"></a><span class="lineno"> 715</span>  <span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> -<div class="line"><a name="l00716"></a><span class="lineno"> 716</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::UNAUTHORIZED)</div> -<div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  {</div> -<div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  <span class="comment">// TODO(arojas): Many HTTP client implementations do not support</span></div> -<div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  <span class="comment">// multiple challenges within a single 'WWW-Authenticate' header.</span></div> -<div class="line"><a name="l00720"></a><span class="lineno"> 720</span>  <span class="comment">// Once MESOS-3306 is fixed, we can use multiple entries for the</span></div> -<div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  <span class="comment">// same header.</span></div> -<div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"WWW-Authenticate"</span>] = <a class="code" href="namespacestrings.html#ac315a6174f56cba0d8295f84da265416">strings::join</a>(<span class="stringliteral">", "</span>, challenges);</div> -<div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  }</div> -<div class="line"><a name="l00724"></a><span class="lineno"> 724</span> };</div> -<div class="line"><a name="l00725"></a><span class="lineno"> 725</span> </div> -<div class="line"><a name="l00726"></a><span class="lineno"> 726</span> </div> -<div class="line"><a name="l00727"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Forbidden.html"> 727</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Forbidden.html">Forbidden</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00728"></a><span class="lineno"> 728</span> {</div> -<div class="line"><a name="l00729"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Forbidden.html#a462722ea1d711a3f0072842b9944d525"> 729</a></span>  <a class="code" href="structprocess_1_1http_1_1Forbidden.html#a462722ea1d711a3f0072842b9944d525">Forbidden</a>() : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::FORBIDDEN) {}</div> -<div class="line"><a name="l00730"></a><span class="lineno"> 730</span> </div> -<div class="line"><a name="l00731"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Forbidden.html#a16198b33fc0c9133ffb54116eab651c9"> 731</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1Forbidden.html#a16198b33fc0c9133ffb54116eab651c9">Forbidden</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> -<div class="line"><a name="l00732"></a><span class="lineno"> 732</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::FORBIDDEN) {}</div> -<div class="line"><a name="l00733"></a><span class="lineno"> 733</span> };</div> -<div class="line"><a name="l00734"></a><span class="lineno"> 734</span> </div> -<div class="line"><a name="l00735"></a><span class="lineno"> 735</span> </div> -<div class="line"><a name="l00736"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1NotFound.html"> 736</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1NotFound.html">NotFound</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00737"></a><span class="lineno"> 737</span> {</div> -<div class="line"><a name="l00738"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1NotFound.html#a45432f89f82b758deed0cd6a7994c1fb"> 738</a></span>  <a class="code" href="structprocess_1_1http_1_1NotFound.html#a45432f89f82b758deed0cd6a7994c1fb">NotFound</a>() : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::NOT_FOUND) {}</div> -<div class="line"><a name="l00739"></a><span class="lineno"> 739</span> </div> -<div class="line"><a name="l00740"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1NotFound.html#afd150061e7afc57ec91516045b09c703"> 740</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1NotFound.html#afd150061e7afc57ec91516045b09c703">NotFound</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> -<div class="line"><a name="l00741"></a><span class="lineno"> 741</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::NOT_FOUND) {}</div> -<div class="line"><a name="l00742"></a><span class="lineno"> 742</span> };</div> -<div class="line"><a name="l00743"></a><span class="lineno"> 743</span> </div> -<div class="line"><a name="l00744"></a><span class="lineno"> 744</span> </div> -<div class="line"><a name="l00745"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1MethodNotAllowed.html"> 745</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1MethodNotAllowed.html">MethodNotAllowed</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> -<div class="line"><a name="l00746"></a><span class="lineno"> 746</span> {</div> -<div class="line"><a name="l00747"></a><span class="lineno"> 747</span>  <span class="comment">// According to RFC 2616, "An Allow header field MUST be present in a</span></div> -<div class="line"><a name="l00748"></a><span class="lineno"> 748</span>  <span class="comment">// 405 (Method Not Allowed) response".</span></div> -<div class="line"><a name="l00749"></a><span class="lineno"> 749</span> </div> -<div class="line"><a name="l00750"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1MethodNotAllowed.html#af751e04988cd5dd4fca65d053e620565"> 750</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1MethodNotAllowed.html#af751e04988cd5dd4fca65d053e620565">MethodNotAllowed</a>(</div> -<div class="line"><a name="l00751"></a><span class="lineno"> 751</span>  <span class="keyword">const</span> std::initializer_list<std::string>& allowedMethods)</div> -<div class="line"><a name="l00752"></a><span class="lineno"> 752</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::METHOD_NOT_ALLOWED)</div> -<div class="line"><a name="l00753"></a><span class="lineno"> 753</span>  {</div> -<div class="line"><a name="l00754"></a><span class="lineno"> 754</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"Allow"</span>] = <a class="code" href="namespacestrings.html#ac315a6174f56cba0d8295f84da265416">strings::join</a>(<span class="stringliteral">", "</span>, allowedMethods);</div> -<div class="line"><a name="l00755"></a><span class="lineno"> 755</span>  }</div> +<div class="line"><a name="l00669"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html#a82a9276bdee5eb85723f8b651c1c3ebb"> 669</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1OK.html#a82a9276bdee5eb85723f8b651c1c3ebb">OK</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>) : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::<a class="code" href="structprocess_1_1http_1_1OK.html">OK</a>) {}</div> +<div class="line"><a name="l00670"></a><span class="lineno"> 670</span> </div> +<div class="line"><a name="l00671"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1OK.html#adb6550d4be6f18eedffea30d2f39faf6"> 671</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1OK.html#adb6550d4be6f18eedffea30d2f39faf6">OK</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>, <span class="keyword">const</span> std::string& contentType)</div> +<div class="line"><a name="l00672"></a><span class="lineno"> 672</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::<a class="code" href="structprocess_1_1http_1_1OK.html">OK</a>, contentType) {}</div> +<div class="line"><a name="l00673"></a><span class="lineno"> 673</span> </div> +<div class="line"><a name="l00674"></a><span class="lineno"> 674</span>  <a class="code" href="structprocess_1_1http_1_1OK.html#af0ee20be64fc087545d5e44d0d59fc2f">OK</a>(<span class="keyword">const</span> <a class="code" href="structJSON_1_1Value.html">JSON::Value</a>& value, <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a>& jsonp = <a class="code" href="structNone.html">None</a>());</div> +<div class="line"><a name="l00675"></a><span class="lineno"> 675</span> </div> +<div class="line"><a name="l00676"></a><span class="lineno"> 676</span>  <a class="code" href="structprocess_1_1http_1_1OK.html#af0ee20be64fc087545d5e44d0d59fc2f">OK</a>(<a class="code" href="classJSON_1_1Proxy.html">JSON::Proxy</a>&& value, <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a>& jsonp = <a class="code" href="structNone.html">None</a>());</div> +<div class="line"><a name="l00677"></a><span class="lineno"> 677</span> };</div> +<div class="line"><a name="l00678"></a><span class="lineno"> 678</span> </div> +<div class="line"><a name="l00679"></a><span class="lineno"> 679</span> </div> +<div class="line"><a name="l00680"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Accepted.html"> 680</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Accepted.html">Accepted</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> +<div class="line"><a name="l00681"></a><span class="lineno"> 681</span> {</div> +<div class="line"><a name="l00682"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Accepted.html#a44ee87e5b1bda7e30f5afbd709a0c25f"> 682</a></span>  <a class="code" href="structprocess_1_1http_1_1Accepted.html#a44ee87e5b1bda7e30f5afbd709a0c25f">Accepted</a>() : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::ACCEPTED) {}</div> +<div class="line"><a name="l00683"></a><span class="lineno"> 683</span> </div> +<div class="line"><a name="l00684"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Accepted.html#ac694c4b875e0d6e21ace64e82be1753c"> 684</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1Accepted.html#ac694c4b875e0d6e21ace64e82be1753c">Accepted</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> +<div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::ACCEPTED) {}</div> +<div class="line"><a name="l00686"></a><span class="lineno"> 686</span> };</div> +<div class="line"><a name="l00687"></a><span class="lineno"> 687</span> </div> +<div class="line"><a name="l00688"></a><span class="lineno"> 688</span> </div> +<div class="line"><a name="l00689"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1TemporaryRedirect.html"> 689</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1TemporaryRedirect.html">TemporaryRedirect</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> +<div class="line"><a name="l00690"></a><span class="lineno"> 690</span> {</div> +<div class="line"><a name="l00691"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1TemporaryRedirect.html#adbbe7389179708e229d9a07071041fde"> 691</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1TemporaryRedirect.html#adbbe7389179708e229d9a07071041fde">TemporaryRedirect</a>(<span class="keyword">const</span> std::string& url)</div> +<div class="line"><a name="l00692"></a><span class="lineno"> 692</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::TEMPORARY_REDIRECT)</div> +<div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  {</div> +<div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"Location"</span>] = url;</div> +<div class="line"><a name="l00695"></a><span class="lineno"> 695</span>  }</div> +<div class="line"><a name="l00696"></a><span class="lineno"> 696</span> };</div> +<div class="line"><a name="l00697"></a><span class="lineno"> 697</span> </div> +<div class="line"><a name="l00698"></a><span class="lineno"> 698</span> </div> +<div class="line"><a name="l00699"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1BadRequest.html"> 699</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1BadRequest.html">BadRequest</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> +<div class="line"><a name="l00700"></a><span class="lineno"> 700</span> {</div> +<div class="line"><a name="l00701"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1BadRequest.html#a0c222100add3ed4f99754a7313ef0193"> 701</a></span>  <a class="code" href="structprocess_1_1http_1_1BadRequest.html#a0c222100add3ed4f99754a7313ef0193">BadRequest</a>() : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::BAD_REQUEST) {}</div> +<div class="line"><a name="l00702"></a><span class="lineno"> 702</span> </div> +<div class="line"><a name="l00703"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1BadRequest.html#a16f75cbcfe0161d83b8d66a250116e11"> 703</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1BadRequest.html#a16f75cbcfe0161d83b8d66a250116e11">BadRequest</a>(<span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> +<div class="line"><a name="l00704"></a><span class="lineno"> 704</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::BAD_REQUEST) {}</div> +<div class="line"><a name="l00705"></a><span class="lineno"> 705</span> };</div> +<div class="line"><a name="l00706"></a><span class="lineno"> 706</span> </div> +<div class="line"><a name="l00707"></a><span class="lineno"> 707</span> </div> +<div class="line"><a name="l00708"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Unauthorized.html"> 708</a></span> <span class="keyword">struct </span><a class="code" href="structprocess_1_1http_1_1Unauthorized.html">Unauthorized</a> : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a></div> +<div class="line"><a name="l00709"></a><span class="lineno"> 709</span> {</div> +<div class="line"><a name="l00710"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Unauthorized.html#a8d3b046c0080b2ba42674e8ba6261b99"> 710</a></span>  <span class="keyword">explicit</span> <a class="code" href="structprocess_1_1http_1_1Unauthorized.html#a8d3b046c0080b2ba42674e8ba6261b99">Unauthorized</a>(<span class="keyword">const</span> std::vector<std::string>& challenges)</div> +<div class="line"><a name="l00711"></a><span class="lineno"> 711</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(<a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::UNAUTHORIZED)</div> +<div class="line"><a name="l00712"></a><span class="lineno"> 712</span>  {</div> +<div class="line"><a name="l00713"></a><span class="lineno"> 713</span>  <span class="comment">// TODO(arojas): Many HTTP client implementations do not support</span></div> +<div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  <span class="comment">// multiple challenges within a single 'WWW-Authenticate' header.</span></div> +<div class="line"><a name="l00715"></a><span class="lineno"> 715</span>  <span class="comment">// Once MESOS-3306 is fixed, we can use multiple entries for the</span></div> +<div class="line"><a name="l00716"></a><span class="lineno"> 716</span>  <span class="comment">// same header.</span></div> +<div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  <a class="code" href="structprocess_1_1http_1_1Response.html#ae463c5c7a083aea98a89cf9b675b59ab">headers</a>[<span class="stringliteral">"WWW-Authenticate"</span>] = <a class="code" href="namespacestrings.html#ac315a6174f56cba0d8295f84da265416">strings::join</a>(<span class="stringliteral">", "</span>, challenges);</div> +<div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  }</div> +<div class="line"><a name="l00719"></a><span class="lineno"> 719</span> </div> +<div class="line"><a name="l00720"></a><span class="lineno"><a class="line" href="structprocess_1_1http_1_1Unauthorized.html#a26a6377efd8016c73710937995f834f3"> 720</a></span>  <a class="code" href="structprocess_1_1http_1_1Unauthorized.html#a26a6377efd8016c73710937995f834f3">Unauthorized</a>(</div> +<div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  <span class="keyword">const</span> std::vector<std::string>& challenges,</div> +<div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <span class="keyword">const</span> std::string& <a class="code" href="structprocess_1_1http_1_1Response.html#a5f6d23dd77e1eeb0737dc728e0109905">body</a>)</div> +<div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  : <a class="code" href="structprocess_1_1http_1_1Response.html">Response</a>(body, <a class="code" href="structprocess_1_1http_1_1Status.html">Status</a>::UNAUTHORIZED)</div> +<div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  {</div> +<div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  <span class="comment">// TODO(arojas): Many HTTP client implementations do not support</span></div> +<div class="line"><a name="l00726"></a><span class="lineno"> 726</span>  <span class="comment">// multiple challenges within a single 'WWW-Authenticate' header.</span></div> +<div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  <span class="comment">// Once MESOS
<TRUNCATED>
