1<!DOCTYPE html> 2<html lang="en"> 3<head> 4<meta charset="UTF-8"> 5<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body> 6<script type="text/javascript">/* <![CDATA[ */ 7function get_sym_list(){return [["Function","xf",[["[MIME_TYPES.form_url_encoded]",268],["[MIME_TYPES.json]",257],["[MIME_TYPES.multipart]",250],["_M.get_body_args",341],["_M.get_body_info",347],["get_body_info",283]]]];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class="c">--</span> 8<a class="l" name="2" href="#2">2</a><span class="c">-- Apache License</span> 9<a class="l" name="3" href="#3">3</a><span class="c">-- Version 2.0, January 2004</span> 10<a class="l" name="4" href="#4">4</a><span class="c">-- <a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a></span> 11<a class="l" name="5" href="#5">5</a><span class="c">--</span> 12<a class="l" name="6" href="#6">6</a><span class="c">-- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</span> 13<a class="l" name="7" href="#7">7</a><span class="c">--</span> 14<a class="l" name="8" href="#8">8</a><span class="c">-- 1. Definitions.</span> 15<a class="l" name="9" href="#9">9</a><span class="c">--</span> 16<a class="hl" name="10" href="#10">10</a><span class="c">-- "License" shall mean the terms and conditions for use, reproduction,</span> 17<a class="l" name="11" href="#11">11</a><span class="c">-- and distribution as defined by Sections 1 through 9 of this document.</span> 18<a class="l" name="12" href="#12">12</a><span class="c">--</span> 19<a class="l" name="13" href="#13">13</a><span class="c">-- "Licensor" shall mean the copyright owner or entity authorized by</span> 20<a class="l" name="14" href="#14">14</a><span class="c">-- the copyright owner that is granting the License.</span> 21<a class="l" name="15" href="#15">15</a><span class="c">--</span> 22<a class="l" name="16" href="#16">16</a><span class="c">-- "Legal Entity" shall mean the union of the acting entity and all</span> 23<a class="l" name="17" href="#17">17</a><span class="c">-- other entities that control, are controlled by, or are under common</span> 24<a class="l" name="18" href="#18">18</a><span class="c">-- control with that entity. For the purposes of this definition,</span> 25<a class="l" name="19" href="#19">19</a><span class="c">-- "control" means (i) the power, direct or indirect, to cause the</span> 26<a class="hl" name="20" href="#20">20</a><span class="c">-- direction or management of such entity, whether by contract or</span> 27<a class="l" name="21" href="#21">21</a><span class="c">-- otherwise, or (ii) ownership of fifty percent (50%) or more of the</span> 28<a class="l" name="22" href="#22">22</a><span class="c">-- outstanding shares, or (iii) beneficial ownership of such entity.</span> 29<a class="l" name="23" href="#23">23</a><span class="c">--</span> 30<a class="l" name="24" href="#24">24</a><span class="c">-- "You" (or "Your") shall mean an individual or Legal Entity</span> 31<a class="l" name="25" href="#25">25</a><span class="c">-- exercising permissions granted by this License.</span> 32<a class="l" name="26" href="#26">26</a><span class="c">--</span> 33<a class="l" name="27" href="#27">27</a><span class="c">-- "Source" form shall mean the preferred form for making modifications,</span> 34<a class="l" name="28" href="#28">28</a><span class="c">-- including but not limited to software source code, documentation</span> 35<a class="l" name="29" href="#29">29</a><span class="c">-- source, and configuration files.</span> 36<a class="hl" name="30" href="#30">30</a><span class="c">--</span> 37<a class="l" name="31" href="#31">31</a><span class="c">-- "Object" form shall mean any form resulting from mechanical</span> 38<a class="l" name="32" href="#32">32</a><span class="c">-- transformation or translation of a Source form, including but</span> 39<a class="l" name="33" href="#33">33</a><span class="c">-- not limited to compiled object code, generated documentation,</span> 40<a class="l" name="34" href="#34">34</a><span class="c">-- and conversions to other media types.</span> 41<a class="l" name="35" href="#35">35</a><span class="c">--</span> 42<a class="l" name="36" href="#36">36</a><span class="c">-- "Work" shall mean the work of authorship, whether in Source or</span> 43<a class="l" name="37" href="#37">37</a><span class="c">-- Object form, made available under the License, as indicated by a</span> 44<a class="l" name="38" href="#38">38</a><span class="c">-- copyright notice that is included in or attached to the work</span> 45<a class="l" name="39" href="#39">39</a><span class="c">-- (an example is provided in the Appendix below).</span> 46<a class="hl" name="40" href="#40">40</a><span class="c">--</span> 47<a class="l" name="41" href="#41">41</a><span class="c">-- "Derivative Works" shall mean any work, whether in Source or Object</span> 48<a class="l" name="42" href="#42">42</a><span class="c">-- form, that is based on (or derived from) the Work and for which the</span> 49<a class="l" name="43" href="#43">43</a><span class="c">-- editorial revisions, annotations, elaborations, or other modifications</span> 50<a class="l" name="44" href="#44">44</a><span class="c">-- represent, as a whole, an original work of authorship. For the purposes</span> 51<a class="l" name="45" href="#45">45</a><span class="c">-- of this License, Derivative Works shall not include works that remain</span> 52<a class="l" name="46" href="#46">46</a><span class="c">-- separable from, or merely link (or bind by name) to the interfaces of,</span> 53<a class="l" name="47" href="#47">47</a><span class="c">-- the Work and Derivative Works thereof.</span> 54<a class="l" name="48" href="#48">48</a><span class="c">--</span> 55<a class="l" name="49" href="#49">49</a><span class="c">-- "Contribution" shall mean any work of authorship, including</span> 56<a class="hl" name="50" href="#50">50</a><span class="c">-- the original version of the Work and any modifications or additions</span> 57<a class="l" name="51" href="#51">51</a><span class="c">-- to that Work or Derivative Works thereof, that is intentionally</span> 58<a class="l" name="52" href="#52">52</a><span class="c">-- submitted to Licensor for inclusion in the Work by the copyright owner</span> 59<a class="l" name="53" href="#53">53</a><span class="c">-- or by an individual or Legal Entity authorized to submit on behalf of</span> 60<a class="l" name="54" href="#54">54</a><span class="c">-- the copyright owner. For the purposes of this definition, "submitted"</span> 61<a class="l" name="55" href="#55">55</a><span class="c">-- means any form of electronic, verbal, or written communication sent</span> 62<a class="l" name="56" href="#56">56</a><span class="c">-- to the Licensor or its representatives, including but not limited to</span> 63<a class="l" name="57" href="#57">57</a><span class="c">-- communication on electronic mailing lists, source code control systems,</span> 64<a class="l" name="58" href="#58">58</a><span class="c">-- and issue tracking systems that are managed by, or on behalf of, the</span> 65<a class="l" name="59" href="#59">59</a><span class="c">-- Licensor for the purpose of discussing and improving the Work, but</span> 66<a class="hl" name="60" href="#60">60</a><span class="c">-- excluding communication that is conspicuously marked or otherwise</span> 67<a class="l" name="61" href="#61">61</a><span class="c">-- designated in writing by the copyright owner as "Not a Contribution."</span> 68<a class="l" name="62" href="#62">62</a><span class="c">--</span> 69<a class="l" name="63" href="#63">63</a><span class="c">-- "Contributor" shall mean Licensor and any individual or Legal Entity</span> 70<a class="l" name="64" href="#64">64</a><span class="c">-- on behalf of whom a Contribution has been received by Licensor and</span> 71<a class="l" name="65" href="#65">65</a><span class="c">-- subsequently incorporated within the Work.</span> 72<a class="l" name="66" href="#66">66</a><span class="c">--</span> 73<a class="l" name="67" href="#67">67</a><span class="c">-- 2. Grant of Copyright License. Subject to the terms and conditions of</span> 74<a class="l" name="68" href="#68">68</a><span class="c">-- this License, each Contributor hereby grants to You a perpetual,</span> 75<a class="l" name="69" href="#69">69</a><span class="c">-- worldwide, non-exclusive, no-charge, royalty-free, irrevocable</span> 76<a class="hl" name="70" href="#70">70</a><span class="c">-- copyright license to reproduce, prepare Derivative Works of,</span> 77<a class="l" name="71" href="#71">71</a><span class="c">-- publicly display, publicly perform, sublicense, and distribute the</span> 78<a class="l" name="72" href="#72">72</a><span class="c">-- Work and such Derivative Works in Source or Object form.</span> 79<a class="l" name="73" href="#73">73</a><span class="c">--</span> 80<a class="l" name="74" href="#74">74</a><span class="c">-- 3. Grant of Patent License. Subject to the terms and conditions of</span> 81<a class="l" name="75" href="#75">75</a><span class="c">-- this License, each Contributor hereby grants to You a perpetual,</span> 82<a class="l" name="76" href="#76">76</a><span class="c">-- worldwide, non-exclusive, no-charge, royalty-free, irrevocable</span> 83<a class="l" name="77" href="#77">77</a><span class="c">-- (except as stated in this section) patent license to make, have made,</span> 84<a class="l" name="78" href="#78">78</a><span class="c">-- use, offer to sell, sell, import, and otherwise transfer the Work,</span> 85<a class="l" name="79" href="#79">79</a><span class="c">-- where such license applies only to those patent claims licensable</span> 86<a class="hl" name="80" href="#80">80</a><span class="c">-- by such Contributor that are necessarily infringed by their</span> 87<a class="l" name="81" href="#81">81</a><span class="c">-- Contribution(s) alone or by combination of their Contribution(s)</span> 88<a class="l" name="82" href="#82">82</a><span class="c">-- with the Work to which such Contribution(s) was submitted. If You</span> 89<a class="l" name="83" href="#83">83</a><span class="c">-- institute patent litigation against any entity (including a</span> 90<a class="l" name="84" href="#84">84</a><span class="c">-- cross-claim or counterclaim in a lawsuit) alleging that the Work</span> 91<a class="l" name="85" href="#85">85</a><span class="c">-- or a Contribution incorporated within the Work constitutes direct</span> 92<a class="l" name="86" href="#86">86</a><span class="c">-- or contributory patent infringement, then any patent licenses</span> 93<a class="l" name="87" href="#87">87</a><span class="c">-- granted to You under this License for that Work shall terminate</span> 94<a class="l" name="88" href="#88">88</a><span class="c">-- as of the date such litigation is filed.</span> 95<a class="l" name="89" href="#89">89</a><span class="c">--</span> 96<a class="hl" name="90" href="#90">90</a><span class="c">-- 4. Redistribution. You may reproduce and distribute copies of the</span> 97<a class="l" name="91" href="#91">91</a><span class="c">-- Work or Derivative Works thereof in any medium, with or without</span> 98<a class="l" name="92" href="#92">92</a><span class="c">-- modifications, and in Source or Object form, provided that You</span> 99<a class="l" name="93" href="#93">93</a><span class="c">-- meet the following conditions:</span> 100<a class="l" name="94" href="#94">94</a><span class="c">--</span> 101<a class="l" name="95" href="#95">95</a><span class="c">-- (a) You must give any other recipients of the Work or</span> 102<a class="l" name="96" href="#96">96</a><span class="c">-- Derivative Works a copy of this License; and</span> 103<a class="l" name="97" href="#97">97</a><span class="c">--</span> 104<a class="l" name="98" href="#98">98</a><span class="c">-- (b) You must cause any modified files to carry prominent notices</span> 105<a class="l" name="99" href="#99">99</a><span class="c">-- stating that You changed the files; and</span> 106<a class="hl" name="100" href="#100">100</a><span class="c">--</span> 107<a class="l" name="101" href="#101">101</a><span class="c">-- (c) You must retain, in the Source form of any Derivative Works</span> 108<a class="l" name="102" href="#102">102</a><span class="c">-- that You distribute, all copyright, patent, trademark, and</span> 109<a class="l" name="103" href="#103">103</a><span class="c">-- attribution notices from the Source form of the Work,</span> 110<a class="l" name="104" href="#104">104</a><span class="c">-- excluding those notices that do not pertain to any part of</span> 111<a class="l" name="105" href="#105">105</a><span class="c">-- the Derivative Works; and</span> 112<a class="l" name="106" href="#106">106</a><span class="c">--</span> 113<a class="l" name="107" href="#107">107</a><span class="c">-- (d) If the Work includes a "NOTICE" text file as part of its</span> 114<a class="l" name="108" href="#108">108</a><span class="c">-- distribution, then any Derivative Works that You distribute must</span> 115<a class="l" name="109" href="#109">109</a><span class="c">-- include a readable copy of the attribution notices contained</span> 116<a class="hl" name="110" href="#110">110</a><span class="c">-- within such NOTICE file, excluding those notices that do not</span> 117<a class="l" name="111" href="#111">111</a><span class="c">-- pertain to any part of the Derivative Works, in at least one</span> 118<a class="l" name="112" href="#112">112</a><span class="c">-- of the following places: within a NOTICE text file distributed</span> 119<a class="l" name="113" href="#113">113</a><span class="c">-- as part of the Derivative Works; within the Source form or</span> 120<a class="l" name="114" href="#114">114</a><span class="c">-- documentation, if provided along with the Derivative Works; or,</span> 121<a class="l" name="115" href="#115">115</a><span class="c">-- within a display generated by the Derivative Works, if and</span> 122<a class="l" name="116" href="#116">116</a><span class="c">-- wherever such third-party notices normally appear. The contents</span> 123<a class="l" name="117" href="#117">117</a><span class="c">-- of the NOTICE file are for informational purposes only and</span> 124<a class="l" name="118" href="#118">118</a><span class="c">-- do not modify the License. You may add Your own attribution</span> 125<a class="l" name="119" href="#119">119</a><span class="c">-- notices within Derivative Works that You distribute, alongside</span> 126<a class="hl" name="120" href="#120">120</a><span class="c">-- or as an addendum to the NOTICE text from the Work, provided</span> 127<a class="l" name="121" href="#121">121</a><span class="c">-- that such additional attribution notices cannot be construed</span> 128<a class="l" name="122" href="#122">122</a><span class="c">-- as modifying the License.</span> 129<a class="l" name="123" href="#123">123</a><span class="c">--</span> 130<a class="l" name="124" href="#124">124</a><span class="c">-- You may add Your own copyright statement to Your modifications and</span> 131<a class="l" name="125" href="#125">125</a><span class="c">-- may provide additional or different license terms and conditions</span> 132<a class="l" name="126" href="#126">126</a><span class="c">-- for use, reproduction, or distribution of Your modifications, or</span> 133<a class="l" name="127" href="#127">127</a><span class="c">-- for any such Derivative Works as a whole, provided Your use,</span> 134<a class="l" name="128" href="#128">128</a><span class="c">-- reproduction, and distribution of the Work otherwise complies with</span> 135<a class="l" name="129" href="#129">129</a><span class="c">-- the conditions stated in this License.</span> 136<a class="hl" name="130" href="#130">130</a><span class="c">--</span> 137<a class="l" name="131" href="#131">131</a><span class="c">-- 5. Submission of Contributions. Unless You explicitly state otherwise,</span> 138<a class="l" name="132" href="#132">132</a><span class="c">-- any Contribution intentionally submitted for inclusion in the Work</span> 139<a class="l" name="133" href="#133">133</a><span class="c">-- by You to the Licensor shall be under the terms and conditions of</span> 140<a class="l" name="134" href="#134">134</a><span class="c">-- this License, without any additional terms or conditions.</span> 141<a class="l" name="135" href="#135">135</a><span class="c">-- Notwithstanding the above, nothing herein shall supersede or modify</span> 142<a class="l" name="136" href="#136">136</a><span class="c">-- the terms of any separate license agreement you may have executed</span> 143<a class="l" name="137" href="#137">137</a><span class="c">-- with Licensor regarding such Contributions.</span> 144<a class="l" name="138" href="#138">138</a><span class="c">--</span> 145<a class="l" name="139" href="#139">139</a><span class="c">-- 6. Trademarks. This License does not grant permission to use the trade</span> 146<a class="hl" name="140" href="#140">140</a><span class="c">-- names, trademarks, service marks, or product names of the Licensor,</span> 147<a class="l" name="141" href="#141">141</a><span class="c">-- except as required for reasonable and customary use in describing the</span> 148<a class="l" name="142" href="#142">142</a><span class="c">-- origin of the Work and reproducing the content of the NOTICE file.</span> 149<a class="l" name="143" href="#143">143</a><span class="c">--</span> 150<a class="l" name="144" href="#144">144</a><span class="c">-- 7. Disclaimer of Warranty. Unless required by applicable law or</span> 151<a class="l" name="145" href="#145">145</a><span class="c">-- agreed to in writing, Licensor provides the Work (and each</span> 152<a class="l" name="146" href="#146">146</a><span class="c">-- Contributor provides its Contributions) on an "AS IS" BASIS,</span> 153<a class="l" name="147" href="#147">147</a><span class="c">-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or</span> 154<a class="l" name="148" href="#148">148</a><span class="c">-- implied, including, without limitation, any warranties or conditions</span> 155<a class="l" name="149" href="#149">149</a><span class="c">-- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A</span> 156<a class="hl" name="150" href="#150">150</a><span class="c">-- PARTICULAR PURPOSE. You are solely responsible for determining the</span> 157<a class="l" name="151" href="#151">151</a><span class="c">-- appropriateness of using or redistributing the Work and assume any</span> 158<a class="l" name="152" href="#152">152</a><span class="c">-- risks associated with Your exercise of permissions under this License.</span> 159<a class="l" name="153" href="#153">153</a><span class="c">--</span> 160<a class="l" name="154" href="#154">154</a><span class="c">-- 8. Limitation of Liability. In no event and under no legal theory,</span> 161<a class="l" name="155" href="#155">155</a><span class="c">-- whether in tort (including negligence), contract, or otherwise,</span> 162<a class="l" name="156" href="#156">156</a><span class="c">-- unless required by applicable law (such as deliberate and grossly</span> 163<a class="l" name="157" href="#157">157</a><span class="c">-- negligent acts) or agreed to in writing, shall any Contributor be</span> 164<a class="l" name="158" href="#158">158</a><span class="c">-- liable to You for damages, including any direct, indirect, special,</span> 165<a class="l" name="159" href="#159">159</a><span class="c">-- incidental, or consequential damages of any character arising as a</span> 166<a class="hl" name="160" href="#160">160</a><span class="c">-- result of this License or out of the use or inability to use the</span> 167<a class="l" name="161" href="#161">161</a><span class="c">-- Work (including but not limited to damages for loss of goodwill,</span> 168<a class="l" name="162" href="#162">162</a><span class="c">-- work stoppage, computer failure or malfunction, or any and all</span> 169<a class="l" name="163" href="#163">163</a><span class="c">-- other commercial damages or losses), even if such Contributor</span> 170<a class="l" name="164" href="#164">164</a><span class="c">-- has been advised of the possibility of such damages.</span> 171<a class="l" name="165" href="#165">165</a><span class="c">--</span> 172<a class="l" name="166" href="#166">166</a><span class="c">-- 9. Accepting Warranty or Additional Liability. While redistributing</span> 173<a class="l" name="167" href="#167">167</a><span class="c">-- the Work or Derivative Works thereof, You may choose to offer,</span> 174<a class="l" name="168" href="#168">168</a><span class="c">-- and charge a fee for, acceptance of support, warranty, indemnity,</span> 175<a class="l" name="169" href="#169">169</a><span class="c">-- or other liability obligations <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> rights consistent with this</span> 176<a class="hl" name="170" href="#170">170</a><span class="c">-- License. However, in accepting such obligations, You may act only</span> 177<a class="l" name="171" href="#171">171</a><span class="c">-- on Your own behalf and on Your sole responsibility, not on behalf</span> 178<a class="l" name="172" href="#172">172</a><span class="c">-- of any other Contributor, and only if You agree to indemnify,</span> 179<a class="l" name="173" href="#173">173</a><span class="c">-- defend, and hold each Contributor harmless for any liability</span> 180<a class="l" name="174" href="#174">174</a><span class="c">-- incurred by, or claims asserted against, such Contributor by reason</span> 181<a class="l" name="175" href="#175">175</a><span class="c">-- of your accepting any such warranty or additional liability.</span> 182<a class="l" name="176" href="#176">176</a><span class="c">--</span> 183<a class="l" name="177" href="#177">177</a><span class="c">-- END OF TERMS AND CONDITIONS</span> 184<a class="l" name="178" href="#178">178</a><span class="c">--</span> 185<a class="l" name="179" href="#179">179</a><span class="c">-- APPENDIX: How to apply the Apache License to your work.</span> 186<a class="hl" name="180" href="#180">180</a><span class="c">--</span> 187<a class="l" name="181" href="#181">181</a><span class="c">-- To apply the Apache License to your work, attach the following</span> 188<a class="l" name="182" href="#182">182</a><span class="c">-- boilerplate notice, with the fields enclosed by brackets "[]"</span> 189<a class="l" name="183" href="#183">183</a><span class="c">-- replaced with your own identifying information. (Don't include</span> 190<a class="l" name="184" href="#184">184</a><span class="c">-- the brackets!) The text should be enclosed in the appropriate</span> 191<a class="l" name="185" href="#185">185</a><span class="c">-- comment syntax for the file format. We also recommend that a</span> 192<a class="l" name="186" href="#186">186</a><span class="c">-- file or class name and description of purpose be included on the</span> 193<a class="l" name="187" href="#187">187</a><span class="c">-- same "printed page" as the copyright notice for easier</span> 194<a class="l" name="188" href="#188">188</a><span class="c">-- identification within third-party archives.</span> 195<a class="l" name="189" href="#189">189</a><span class="c">--</span> 196<a class="hl" name="190" href="#190">190</a><span class="c">-- Copyright 2016-2017 Kong Inc.</span> 197<a class="l" name="191" href="#191">191</a><span class="c">--</span> 198<a class="l" name="192" href="#192">192</a><span class="c">-- Licensed under the Apache License, Version 2.0 (the "License");</span> 199<a class="l" name="193" href="#193">193</a><span class="c">-- you may not use this file except in compliance with the License.</span> 200<a class="l" name="194" href="#194">194</a><span class="c">-- You may obtain a copy of the License at</span> 201<a class="l" name="195" href="#195">195</a><span class="c">--</span> 202<a class="l" name="196" href="#196">196</a><span class="c">-- <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></span> 203<a class="l" name="197" href="#197">197</a><span class="c">--</span> 204<a class="l" name="198" href="#198">198</a><span class="c">-- Unless required by applicable law or agreed to in writing, software</span> 205<a class="l" name="199" href="#199">199</a><span class="c">-- distributed under the License is distributed on an "AS IS" BASIS,</span> 206<a class="hl" name="200" href="#200">200</a><span class="c">-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> 207<a class="l" name="201" href="#201">201</a><span class="c">-- See the License for the specific language governing permissions and</span> 208<a class="l" name="202" href="#202">202</a><span class="c">-- limitations under the License.</span> 209<a class="l" name="203" href="#203">203</a> 210<a class="l" name="204" href="#204">204</a><b>local</b> <a href="/source/s?defs=pcall" class="intelliWindow-symbol" data-definition-place="undefined-in-file">pcall</a> = <a href="/source/s?defs=pcall" class="intelliWindow-symbol" data-definition-place="undefined-in-file">pcall</a> 211<a class="l" name="205" href="#205">205</a><b>local</b> <a href="/source/s?defs=ngx_log" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_log</a> = <a href="/source/s?defs=ngx" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx</a>.<a href="/source/s?defs=log" class="intelliWindow-symbol" data-definition-place="undefined-in-file">log</a> 212<a class="l" name="206" href="#206">206</a><b>local</b> <a href="/source/s?defs=ERR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERR</a> = <a href="/source/s?defs=ngx" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx</a>.<a href="/source/s?defs=ERR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERR</a> 213<a class="l" name="207" href="#207">207</a> 214<a class="l" name="208" href="#208">208</a> 215<a class="l" name="209" href="#209">209</a><b>local</b> <a href="/source/s?defs=_M" class="intelliWindow-symbol" data-definition-place="undefined-in-file">_M</a> = {} 216<a class="hl" name="210" href="#210">210</a> 217<a class="l" name="211" href="#211">211</a> 218<a class="l" name="212" href="#212">212</a><b>do</b> 219<a class="l" name="213" href="#213">213</a> <b>local</b> <a href="/source/s?defs=multipart" class="intelliWindow-symbol" data-definition-place="undefined-in-file">multipart</a> = <a href="/source/s?defs=require" class="intelliWindow-symbol" data-definition-place="undefined-in-file">require</a> <span class="s">"multipart"</span> 220<a class="l" name="214" href="#214">214</a> <b>local</b> <a href="/source/s?defs=cjson" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cjson</a> = <a href="/source/s?defs=require" class="intelliWindow-symbol" data-definition-place="undefined-in-file">require</a> <span class="s">"cjson.safe"</span> 221<a class="l" name="215" href="#215">215</a> 222<a class="l" name="216" href="#216">216</a> 223<a class="l" name="217" href="#217">217</a> <b>local</b> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a> = <a href="/source/s?defs=string" class="intelliWindow-symbol" data-definition-place="undefined-in-file">string</a>.<a href="/source/s?defs=find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">find</a> 224<a class="l" name="218" href="#218">218</a> <b>local</b> <a href="/source/s?defs=str_format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_format</a> = <a href="/source/s?defs=string" class="intelliWindow-symbol" data-definition-place="undefined-in-file">string</a>.<a href="/source/s?defs=format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">format</a> 225<a class="l" name="219" href="#219">219</a> <b>local</b> <a href="/source/s?defs=ngx_req_get_post_args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_req_get_post_args</a> = <a href="/source/s?defs=ngx" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx</a>.<a href="/source/s?defs=req" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req</a>.<a href="/source/s?defs=get_post_args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">get_post_args</a> 226<a class="hl" name="220" href="#220">220</a> <b>local</b> <a href="/source/s?defs=ngx_req_get_body_data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_req_get_body_data</a> = <a href="/source/s?defs=ngx" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx</a>.<a href="/source/s?defs=req" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req</a>.<a href="/source/s?defs=get_body_data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">get_body_data</a> 227<a class="l" name="221" href="#221">221</a> 228<a class="l" name="222" href="#222">222</a> 229<a class="l" name="223" href="#223">223</a> <b>local</b> <a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a> = { 230<a class="l" name="224" href="#224">224</a> <a href="/source/s?defs=form_url_encoded" class="intelliWindow-symbol" data-definition-place="undefined-in-file">form_url_encoded</a> = <span class="n">1</span>, 231<a class="l" name="225" href="#225">225</a> <a href="/source/s?defs=json" class="intelliWindow-symbol" data-definition-place="undefined-in-file">json</a> = <span class="n">2</span>, 232<a class="l" name="226" href="#226">226</a> <a href="/source/s?defs=xml" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xml</a> = <span class="n">3</span>, 233<a class="l" name="227" href="#227">227</a> <a href="/source/s?defs=multipart" class="intelliWindow-symbol" data-definition-place="undefined-in-file">multipart</a> = <span class="n">4</span>, 234<a class="l" name="228" href="#228">228</a> <a href="/source/s?defs=text" class="intelliWindow-symbol" data-definition-place="undefined-in-file">text</a> = <span class="n">5</span>, 235<a class="l" name="229" href="#229">229</a> <a href="/source/s?defs=html" class="intelliWindow-symbol" data-definition-place="undefined-in-file">html</a> = <span class="n">6</span>, 236<a class="hl" name="230" href="#230">230</a> } 237<a class="l" name="231" href="#231">231</a> 238<a class="l" name="232" href="#232">232</a> 239<a class="l" name="233" href="#233">233</a> <b>local</b> <a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a> = { 240<a class="l" name="234" href="#234">234</a> <a href="/source/s?defs=no_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">no_ct</a> = <span class="n">1</span> + <span class="n">0xFFFF</span> - <span class="n">0XFFFF</span>, 241<a class="l" name="235" href="#235">235</a> [<span class="n">1</span>] = <span class="s">"don't know how to parse request body (no Content-Type)"</span>, 242<a class="l" name="236" href="#236">236</a> <a href="/source/s?defs=unknown_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unknown_ct</a> = <span class="n">2</span>, 243<a class="l" name="237" href="#237">237</a> [<span class="n">2</span>] = <span class="s">"don't know how to parse request body ("</span> .. 244<a class="l" name="238" href="#238">238</a> <span class="s">"unknown Content-Type '%s')"</span>, 245<a class="l" name="239" href="#239">239</a> <a href="/source/s?defs=unsupported_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unsupported_ct</a> = <span class="n">3</span>, 246<a class="hl" name="240" href="#240">240</a> [<span class="n">3</span>] = <span class="s">"don't know how to parse request body ("</span> .. 247<a class="l" name="241" href="#241">241</a> <span class="s">"can't decode Content-Type '%s')"</span>, 248<a class="l" name="242" href="#242">242</a> } 249<a class="l" name="243" href="#243">243</a> 250<a class="l" name="244" href="#244">244</a> 251<a class="l" name="245" href="#245">245</a> <a href="/source/s?defs=_M" class="intelliWindow-symbol" data-definition-place="undefined-in-file">_M</a>.<a href="/source/s?defs=req_mime_types" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime_types</a> = <a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a> 252<a class="l" name="246" href="#246">246</a> <a href="/source/s?defs=_M" class="intelliWindow-symbol" data-definition-place="undefined-in-file">_M</a>.<a href="/source/s?defs=req_body_errors" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_body_errors</a> = <a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a> 253<a class="l" name="247" href="#247">247</a> 254<a class="l" name="248" href="#248">248</a> 255<a class="l" name="249" href="#249">249</a> <b>local</b> <a href="/source/s?defs=MIME_DECODERS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_DECODERS</a> = { 256<a class="hl" name="250" href="#250">250</a> [<a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=multipart" class="intelliWindow-symbol" data-definition-place="undefined-in-file">multipart</a>] = <b>function</b>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>) 257<a class="l" name="251" href="#251">251</a> <b>local</b> <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a> = <a href="/source/s?defs=ngx_req_get_body_data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_req_get_body_data</a>() 258<a class="l" name="252" href="#252">252</a> <b>local</b> <a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a> = <a href="/source/s?defs=multipart" class="intelliWindow-symbol" data-definition-place="undefined-in-file">multipart</a>(<a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a>, <a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>):<a href="/source/s?defs=get_all" class="intelliWindow-symbol" data-definition-place="undefined-in-file">get_all</a>() 259<a class="l" name="253" href="#253">253</a> 260<a class="l" name="254" href="#254">254</a> <b>return</b> <a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a>, <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a> 261<a class="l" name="255" href="#255">255</a> <b>end</b>, 262<a class="l" name="256" href="#256">256</a> 263<a class="l" name="257" href="#257">257</a> [<a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=json" class="intelliWindow-symbol" data-definition-place="undefined-in-file">json</a>] = <b>function</b>() 264<a class="l" name="258" href="#258">258</a> <b>local</b> <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a> = <a href="/source/s?defs=ngx_req_get_body_data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_req_get_body_data</a>() 265<a class="l" name="259" href="#259">259</a> <b>local</b> <a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a>, <a href="/source/s?defs=err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">err</a> = <a href="/source/s?defs=cjson" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cjson</a>.<a href="/source/s?defs=decode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">decode</a>(<a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a>) 266<a class="hl" name="260" href="#260">260</a> <b>if</b> <a href="/source/s?defs=err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">err</a> <b>then</b> 267<a class="l" name="261" href="#261">261</a> <a href="/source/s?defs=ngx_log" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_log</a>(<a href="/source/s?defs=ERR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERR</a>, <span class="s">"could not decode JSON body args: "</span>, <a href="/source/s?defs=err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">err</a>) 268<a class="l" name="262" href="#262">262</a> <b>return</b> {}, <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a> 269<a class="l" name="263" href="#263">263</a> <b>end</b> 270<a class="l" name="264" href="#264">264</a> 271<a class="l" name="265" href="#265">265</a> <b>return</b> <a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a>, <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a> 272<a class="l" name="266" href="#266">266</a> <b>end</b>, 273<a class="l" name="267" href="#267">267</a> 274<a class="l" name="268" href="#268">268</a> [<a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=form_url_encoded" class="intelliWindow-symbol" data-definition-place="undefined-in-file">form_url_encoded</a>] = <b>function</b>() 275<a class="l" name="269" href="#269">269</a> <b>local</b> <a href="/source/s?defs=ok" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ok</a>, <a href="/source/s?defs=res" class="intelliWindow-symbol" data-definition-place="undefined-in-file">res</a>, <a href="/source/s?defs=err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">err</a> = <a href="/source/s?defs=pcall" class="intelliWindow-symbol" data-definition-place="undefined-in-file">pcall</a>(<a href="/source/s?defs=ngx_req_get_post_args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_req_get_post_args</a>) 276<a class="hl" name="270" href="#270">270</a> <b>if</b> <b>not</b> <a href="/source/s?defs=ok" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ok</a> <b>or</b> <a href="/source/s?defs=err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">err</a> <b>then</b> 277<a class="l" name="271" href="#271">271</a> <b>local</b> <a href="/source/s?defs=msg" class="intelliWindow-symbol" data-definition-place="undefined-in-file">msg</a> = <a href="/source/s?defs=res" class="intelliWindow-symbol" data-definition-place="undefined-in-file">res</a> <b>and</b> <a href="/source/s?defs=res" class="intelliWindow-symbol" data-definition-place="undefined-in-file">res</a> <b>or</b> <a href="/source/s?defs=err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">err</a> 278<a class="l" name="272" href="#272">272</a> <a href="/source/s?defs=ngx_log" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_log</a>(<a href="/source/s?defs=ERR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERR</a>, <span class="s">"could not get body args: "</span>, <a href="/source/s?defs=msg" class="intelliWindow-symbol" data-definition-place="undefined-in-file">msg</a>) 279<a class="l" name="273" href="#273">273</a> <b>return</b> {} 280<a class="l" name="274" href="#274">274</a> <b>end</b> 281<a class="l" name="275" href="#275">275</a> 282<a class="l" name="276" href="#276">276</a> <span class="c">--[=[ don't read raw_body if not necessary ]]</span> 283<a class="l" name="277" href="#277">277</a><span class="c"> -- if we called get_body_args(), we only want the parsed body ]=]</span> 284<a class="l" name="278" href="#278">278</a> <b>return</b> <a href="/source/s?defs=res" class="intelliWindow-symbol" data-definition-place="undefined-in-file">res</a> 285<a class="l" name="279" href="#279">279</a> <b>end</b>, 286<a class="hl" name="280" href="#280">280</a> } 287<a class="l" name="281" href="#281">281</a> 288<a class="l" name="282" href="#282">282</a> 289<a class="l" name="283" href="#283">283</a> <b>local</b> <b>function</b> <a class="xf" name="get_body_info"/><a href="/source/s?refs=get_body_info" class="xf intelliWindow-symbol" data-definition-place="def">get_body_info</a>() 290<a class="l" name="284" href="#284">284</a> <b>local</b> <a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a> = <a href="/source/s?defs=ngx" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx</a>.<a href="/source/s?defs=var" class="intelliWindow-symbol" data-definition-place="undefined-in-file">var</a>.<a href="/source/s?defs=http_content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">http_content_type</a> 291<a class="l" name="285" href="#285">285</a> 292<a class="l" name="286" href="#286">286</a> <b>if</b> <b>not</b> <a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a> <b>or</b> <a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a> == <span class="s">""</span> <b>then</b> 293<a class="l" name="287" href="#287">287</a> <a href="/source/s?defs=ngx_log" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_log</a>(<a href="/source/s?defs=ERR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERR</a>, <a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>[<a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>.<a href="/source/s?defs=no_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">no_ct</a>]) 294<a class="l" name="288" href="#288">288</a> 295<a class="l" name="289" href="#289">289</a> <b>return</b> {}, <a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>.<a href="/source/s?defs=no_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">no_ct</a> 296<a class="hl" name="290" href="#290">290</a> <b>end</b> 297<a class="l" name="291" href="#291">291</a> 298<a class="l" name="292" href="#292">292</a> <b>local</b> <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> 299<a class="l" name="293" href="#293">293</a> 300<a class="l" name="294" href="#294">294</a> <b>if</b> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">"<a href="/source/s?path=multipart/">multipart</a>/<a href="/source/s?path=multipart/form-data">form-data</a>"</span>, <b>nil</b>, <b>true</b>) <b>then</b> 301<a class="l" name="295" href="#295">295</a> <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> = <a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=multipart" class="intelliWindow-symbol" data-definition-place="undefined-in-file">multipart</a> 302<a class="l" name="296" href="#296">296</a> 303<a class="l" name="297" href="#297">297</a> <b>elseif</b> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">"<a href="/source/s?path=application/">application</a>/<a href="/source/s?path=application/json">json</a>"</span>, <b>nil</b>, <b>true</b>) <b>then</b> 304<a class="l" name="298" href="#298">298</a> <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> = <a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=json" class="intelliWindow-symbol" data-definition-place="undefined-in-file">json</a> 305<a class="l" name="299" href="#299">299</a> 306<a class="hl" name="300" href="#300">300</a> <b>elseif</b> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">"<a href="/source/s?path=application/">application</a>/<a href="/source/s?path=application/www-form-urlencoded">www-form-urlencoded</a>"</span>, <b>nil</b>, <b>true</b>) <b>or</b> 307<a class="l" name="301" href="#301">301</a> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">"<a href="/source/s?path=application/">application</a>/<a href="/source/s?path=application/x-www-form-urlencoded">x-www-form-urlencoded</a>"</span>, <b>nil</b>, <b>true</b>) 308<a class="l" name="302" href="#302">302</a> <b>then</b> 309<a class="l" name="303" href="#303">303</a> <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> = <a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=form_url_encoded" class="intelliWindow-symbol" data-definition-place="undefined-in-file">form_url_encoded</a> 310<a class="l" name="304" href="#304">304</a> 311<a class="l" name="305" href="#305">305</a> <b>elseif</b> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">[=[<a href="/source/s?path=text/">text</a>/<a href="/source/s?path=text/plain">plain</a>]=]</span>, <b>nil</b>, <b>true</b>) <b>then</b> 312<a class="l" name="306" href="#306">306</a> <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> = <a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=text" class="intelliWindow-symbol" data-definition-place="undefined-in-file">text</a> 313<a class="l" name="307" href="#307">307</a> 314<a class="l" name="308" href="#308">308</a> <b>elseif</b> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">"<a href="/source/s?path=text/">text</a>/<a href="/source/s?path=text/html">html</a>"</span>, <b>nil</b>, <b>true</b>) <b>then</b> 315<a class="l" name="309" href="#309">309</a> <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> = <a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=html" class="intelliWindow-symbol" data-definition-place="undefined-in-file">html</a> 316<a class="hl" name="310" href="#310">310</a> 317<a class="l" name="311" href="#311">311</a> <b>elseif</b> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">"<a href="/source/s?path=application/">application</a>/<a href="/source/s?path=application/xml">xml</a>"</span>, <b>nil</b>, <b>true</b>) <b>or</b> 318<a class="l" name="312" href="#312">312</a> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">"<a href="/source/s?path=text/">text</a>/<a href="/source/s?path=text/xml">xml</a>"</span>, <b>nil</b>, <b>true</b>) <b>or</b> 319<a class="l" name="313" href="#313">313</a> <a href="/source/s?defs=str_find" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_find</a>(<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>, <span class="s">"<a href="/source/s?path=application/">application</a>/<a href="/source/s?path=application/soap">soap</a>+xml"</span>, <b>nil</b>, <b>true</b>) 320<a class="l" name="314" href="#314">314</a> <b>then</b> 321<a class="l" name="315" href="#315">315</a> <span class="c">-- considering SOAP 1.1 (<a href="/source/s?path=text/">text</a>/<a href="/source/s?path=text/xml">xml</a>) and SOAP 1.2 (<a href="/source/s?path=application/">application</a>/<a href="/source/s?path=application/soap">soap</a>+xml)</span> 322<a class="l" name="316" href="#316">316</a> <span class="c">-- as XML only for now.</span> 323<a class="l" name="317" href="#317">317</a> <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> = <a href="/source/s?defs=MIME_TYPES" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_TYPES</a>.<a href="/source/s?defs=xml" class="intelliWindow-symbol" data-definition-place="undefined-in-file">xml</a> 324<a class="l" name="318" href="#318">318</a> <b>end</b> 325<a class="l" name="319" href="#319">319</a> 326<a class="hl" name="320" href="#320">320</a> <b>if</b> <b>not</b> <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> <b>then</b> 327<a class="l" name="321" href="#321">321</a> <span class="c">-- unknown Content-Type</span> 328<a class="l" name="322" href="#322">322</a> <a href="/source/s?defs=ngx_log" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_log</a>(<a href="/source/s?defs=ERR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERR</a>, <a href="/source/s?defs=str_format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_format</a>(<a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>[<a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>.<a href="/source/s?defs=unsupported_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unsupported_ct</a>], <a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>)) 329<a class="l" name="323" href="#323">323</a> 330<a class="l" name="324" href="#324">324</a> <b>return</b> {}, <a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>.<a href="/source/s?defs=unknown_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unknown_ct</a> 331<a class="l" name="325" href="#325">325</a> <b>end</b> 332<a class="l" name="326" href="#326">326</a> 333<a class="l" name="327" href="#327">327</a> <b>if</b> <b>not</b> <a href="/source/s?defs=MIME_DECODERS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_DECODERS</a>[<a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a>] <b>then</b> 334<a class="l" name="328" href="#328">328</a> <span class="c">-- known Content-Type, but cannot decode</span> 335<a class="l" name="329" href="#329">329</a> <a href="/source/s?defs=ngx_log" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_log</a>(<a href="/source/s?defs=ERR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERR</a>, <a href="/source/s?defs=str_format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str_format</a>(<a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>[<a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>.<a href="/source/s?defs=unsupported_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unsupported_ct</a>], <a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>)) 336<a class="hl" name="330" href="#330">330</a> 337<a class="l" name="331" href="#331">331</a> <b>return</b> {}, <a href="/source/s?defs=ERRORS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ERRORS</a>.<a href="/source/s?defs=unsupported_ct" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unsupported_ct</a>, <b>nil</b>, <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> 338<a class="l" name="332" href="#332">332</a> <b>end</b> 339<a class="l" name="333" href="#333">333</a> 340<a class="l" name="334" href="#334">334</a> <span class="c">-- decoded Content-Type</span> 341<a class="l" name="335" href="#335">335</a> <b>local</b> <a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a>, <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a> = <a href="/source/s?defs=MIME_DECODERS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MIME_DECODERS</a>[<a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a>](<a href="/source/s?defs=content_type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">content_type</a>) 342<a class="l" name="336" href="#336">336</a> 343<a class="l" name="337" href="#337">337</a> <b>return</b> <a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a>, <b>nil</b>, <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a>, <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> 344<a class="l" name="338" href="#338">338</a> <b>end</b> 345<a class="l" name="339" href="#339">339</a> 346<a class="hl" name="340" href="#340">340</a> 347<a class="l" name="341" href="#341">341</a> <b>function</b> <a href="/source/s?defs=_M" class="intelliWindow-symbol" data-definition-place="undefined-in-file">_M</a>.<a href="/source/s?defs=get_body_args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">get_body_args</a>() 348<a class="l" name="342" href="#342">342</a> <span class="c">-- only return args</span> 349<a class="l" name="343" href="#343">343</a> <b>return</b> (<a class="d intelliWindow-symbol" href="#get_body_info" data-definition-place="defined-in-file">get_body_info</a>()) 350<a class="l" name="344" href="#344">344</a> <b>end</b> 351<a class="l" name="345" href="#345">345</a> 352<a class="l" name="346" href="#346">346</a> 353<a class="l" name="347" href="#347">347</a> <b>function</b> <a href="/source/s?defs=_M" class="intelliWindow-symbol" data-definition-place="undefined-in-file">_M</a>.<a class="d intelliWindow-symbol" href="#get_body_info" data-definition-place="defined-in-file">get_body_info</a>() 354<a class="l" name="348" href="#348">348</a> <b>local</b> <a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a>, <a href="/source/s?defs=err_code" class="intelliWindow-symbol" data-definition-place="undefined-in-file">err_code</a>, <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a>, <a href="/source/s?defs=req_mime0" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime0</a> = <a class="d intelliWindow-symbol" href="#get_body_info" data-definition-place="defined-in-file">get_body_info</a>() 355<a class="l" name="349" href="#349">349</a> <b>if</b> <b>not</b> <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a> <b>then</b> 356<a class="hl" name="350" href="#350">350</a> <span class="c">-- if our body was form-urlencoded and read via ngx.req.get_post_args()</span> 357<a class="l" name="351" href="#351">351</a> <span class="c">-- we need to retrieve the raw body because it was not retrieved by the</span> 358<a class="l" name="352" href="#352">352</a> <span class="c">-- decoder</span> 359<a class="l" name="353" href="#353">353</a> <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a> = <a href="/source/s?defs=ngx_req_get_body_data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ngx_req_get_body_data</a>() 360<a class="l" name="354" href="#354">354</a> <b>end</b> 361<a class="l" name="355" href="#355">355</a> 362<a class="l" name="356" href="#356">356</a> <b>return</b> <a href="/source/s?defs=args" class="intelliWindow-symbol" data-definition-place="undefined-in-file">args</a>, <a href="/source/s?defs=err_code" class="intelliWindow-symbol" data-definition-place="undefined-in-file">err_code</a>, <a href="/source/s?defs=raw_body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">raw_body</a>, <a href="/source/s?defs=req_mime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">req_mime</a> 363<a class="l" name="357" href="#357">357</a> <b>end</b> 364<a class="l" name="358" href="#358">358</a><b>end</b> 365<a class="l" name="359" href="#359">359</a> 366<a class="hl" name="360" href="#360">360</a> 367<a class="l" name="361" href="#361">361</a><b>return</b> <a href="/source/s?defs=_M" class="intelliWindow-symbol" data-definition-place="undefined-in-file">_M</a> 368<a class="l" name="362" href="#362">362</a><b>return</b> <span class="s">'<a href="http://example.com?a=">http://example.com?a=</a>'</span> 369<a class="l" name="363" href="#363">363</a><b>return</b> <span class="s">[=[<a href="http://example.com?a=">http://example.com?a=</a>]=]</span> 370<a class="l" name="364" href="#364">364</a><b>return</b> <span class="s">"<a href="http://example.com?a=">http://example.com?a=</a>"</span> 371<a class="l" name="365" href="#365">365</a><b>return</b> <span class="s">'<a href="http://example.com?a=">http://example.com?a=</a>\'b\''</span> 372<a class="l" name="366" href="#366">366</a></body> 373</html> 374