<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -86,7 +86,7 @@ static void http_field(void *data, const char *field, size_t flen, const char *v
   f = rb_str_dup(global_http_prefix);
   f = rb_str_buf_cat(f, field, flen); 
 
-  for(ch = RSTRING_PTR(f), end = ch + RSTRING_LEN(f); ch &lt; end; ch++) {
+  for(ch = RSTRING_PTR(f) + RSTRING_LEN(global_http_prefix), end = RSTRING_PTR(f) + RSTRING_LEN(f); ch &lt; end; ch++) {
     if(*ch == '-') {
       *ch = '_';
     } else {</diff>
      <filename>ext/thin_parser/thin.c</filename>
    </modified>
    <modified>
      <diff>@@ -200,4 +200,16 @@ EOS
     request = R(&quot;GET / HTTP/1.1\r\n\r\n&quot;)
     request.env['SERVER_NAME'].should == &quot;localhost&quot;
   end
+  
+  it 'should normalize http_fields' do
+    [ &quot;GET /index.html HTTP/1.1\r\nhos-t: localhost\r\n\r\n&quot;,
+      &quot;GET /index.html HTTP/1.1\r\nhOs_t: localhost\r\n\r\n&quot;,
+      &quot;GET /index.html HTTP/1.1\r\nhoS-T: localhost\r\n\r\n&quot;
+    ].each { |req_str|
+      parser     = HttpParser.new
+      req        = {}
+      nread      = parser.execute(req, req_str, 0)
+      req.should be_has_key('HTTP_HOS_T')
+    }
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/request/parser_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7c8e416848e2dfc8f1fb594997be640cf8f398b2</id>
    </parent>
  </parents>
  <author>
    <name>J&#233;r&#233;my Zurcher</name>
    <email>jeremy@asynk.ch</email>
  </author>
  <url>http://github.com/macournoyer/thin/commit/05abf3b301ad8af76acac7e48bbe3502305d06eb</url>
  <id>05abf3b301ad8af76acac7e48bbe3502305d06eb</id>
  <committed-date>2009-01-03T12:31:13-08:00</committed-date>
  <authored-date>2008-12-30T08:31:17-08:00</authored-date>
  <message>thin.c#http_field : omit parsing #defined string

Signed-off-by: J&#233;r&#233;my Zurcher &lt;jeremy@asynk.ch&gt;</message>
  <tree>4df6360e7289dd6041fe38a1158e7c72178ce7a6</tree>
  <committer>
    <name>macournoyer</name>
    <email>macournoyer@gmail.com</email>
  </committer>
</commit>
