title: Setting a unique http request id with haproxy's http-request set-header
body: <p>So I have some existing code that sets a unique request ID in our front-end load balancer:</p>
  
  <pre><code>unique-id-format %{+X}o\ %Ts_%ci_%cp_%fi_%fp_%rt_%pid
  unique-id-header X-Request-Id
  log-format %ci\ %r\ %ST\ %B\ %Tr\ %Tt\ %s\ %ID\ %hr
  </code></pre>
  
  <p>This works as expected -- X-Request-Id is created as expected, logged and passed to the backend. No problems. However, I'd like to make this request ID generation conditional. No problem -- I should just be able to use http-request set-header instead of unique-id-header:</p>
  
  <pre><code>unique-id-format %{+X}o\ %Ts_%ci_%cp_%fi_%fp_%rt_%pid
  http-request set-header X-Request-Id %ID
  log-format %ci\ %r\ %ST\ %B\ %Tr\ %Tt\ %s\ %ID\ %hr
  </code></pre>
  
  <p>(These are all in a front_end section). Maddeningly, however %ID seems to evaluate to empty when used this way. I can use a hardcoded value instead of using %ID and it works. I can also use another log field (like %Ts) and it works. It does not, however, work with %ID. Any clues would be helpful -- thanks in advance.</p>
  
  <p>EDIT: Version is 1.6.11</p>