title: How can I make nginx return a static response and send request headers to app?
body: <p>I am making a high-load web statistics system through embedding <code>&lt;img&gt;</code> tag to site. The thing I want to do is:</p>
  
  <ol>
  <li>nginx gets request for an image from some host</li>
  <li>it gives as answer to host little 1px static image from filesystem</li>
  <li>at this time it somehow transfers request's headers to application and closes connection to host</li>
  </ol>
  
  <p>I am working with Ruby and I'm going to make a pure-Rack app to get the headers and put them into a queue for further calculations.</p>
  
  <p>The problem I can't solve is, how can I configure sphinx to give headers to the Rack app, and return a static image as the reply without waiting a for response from the Rack application?</p>
  
  <p>Also, Rack is not required if there is more common Ruby-solution.</p>