<div dir="ltr">Hi everyone,<div><br></div><div>I'm using Nginx to serve applications of Real Time Bidding listening in different machines inside of my network. Each one of these applications is handling request from only one exchange and I'm successfully proxying the content to the correct applications by using upstreams. </div>

<div><br></div><div>One thing that I'm doing when I need to do some modifications in one o more of these applications is use "return 204" (for RTB system using OpenRTB protocl, HTTP 204 means NO BID) to not forward content. This was working great until now that my employer has decided to include another exchange, in consequence, another application. The new exchange is not OpenRTB based, it uses another protocol to answer, and of course no bid response is different too. </div>

<div><br></div><div>In order to correctly answer with no bid I have to parse XML content which is inside of the request sent by the exchange. This is the form of the response I have to send:</div><div><br></div><div><pre style="margin-right:1em;margin-left:1.6em;padding:2px 2px 2px 0px;background-color:rgb(250,250,250);border:1px solid rgb(218,218,218);width:auto;color:rgb(72,72,72);font-size:12px">

<bidResp xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns="urn:yahoo:amp:3pi:bidResp" xsi:schemaLocation="urn:yahoo:amp:3pi:bidResp BidResponse.xsd" version="6.0">
<bidResEnv signature="00C745CC3125610C5C1A30EBC9388FC7F8FE1F21" signType="SHA-1" token="1218078703"/>

<bidResponseSet numResp="1">
    <bidResponse>
        <oppId>da21129c-aca1-11e2-8c8c-2be3e1d9a996</oppId>
        <advId>502863</advId>
        <buyerLine>4372011</buyerLine>
        <noBid/>
    </bidResponse>
</bidResponseSet></pre><div><br></div><div>OppId, advId, buyerLine, bidResEnv signature are items that comes with the request.</div><div><br></div><div> As you can see I have 2 challenges here:<br></div></div><div>

<br></div><div>* Parse XML body content with Nginx</div><div>* Manipulate It to generate the correct answer</div><div><br></div><div>Do I need to develop a Nginx plugin or there is a simpler way to parse the body content and use it to answer? </div>

<div><br></div><div>I know that Nginx can use headers from the request in the response, so I presume that something with the body could also done.</div><div><br></div><div>Thank you, cheers,</div><div><br></div><div>Guido.-</div>

<div><br></div><div><br></div></div>