title: How does this code result in the string "nginx"?
body: <p>I've been trying to study the nginx source code for a while. Recently, Nginx 1.9.12 was released and with that they implemented "Huffman encoding of response headers in HTTP/2".</p>
  
  <p>In this release, I'm unable to understand the this one line, </p>
  
  <pre><code>static const u_char nginx[5] = "\x84\xaa\x63\x55\xe7";
  </code></pre>
  
  <p>Alternatively, you can browse the source code here: <a href="https://trac.nginx.org/nginx/browser/nginx/src/http/v2/ngx_http_v2_filter_module.c#L146" rel="nofollow">https://trac.nginx.org/nginx/browser/nginx/src/http/v2/ngx_http_v2_filter_module.c#L146</a></p>
  
  <p>This line is what Nginx uses to insert header "Server: <strong>nginx</strong>".</p>
  
  <p>What if I want to change it to "Apache"? I've tried converting the string "apache" to hex and then replace the resulting hex in the file with \xhh notation and changing nginx[5] to nginx[6] because the string apache is 6 characters long.</p>
  
  <p>But the output seems unpredictable. I've searched a lot before asking this question here.</p>
  
  <p>Can someone help me how this code works and how can I replace the text? Any script or online web app to make it easier?</p>