<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -101,13 +101,14 @@ module Resourceful
       ##
       attr_reader :name
       
+      
       def initialize(name, options = {})
         @name = name
         options = Options.for(options).validate(:repeatable, :hop_by_hop, :modifiable)
         
-        @repeatable = options.getopt(:repeatable) || false
+        @repeatable = options.getopt([:repeatable, :multivalue, :multivalued]) || false
         @hop_by_hop = options.getopt(:hop_by_hop) || false
-        @modifiable = options.getopt(:modifiable) || true
+        @modifiable = options.getopt(:modifiable, true)
       end
       
       def repeatable?
@@ -147,7 +148,7 @@ module Resourceful
       end
       
       def ==(another)
-        name_pattern === another.name
+        name_pattern === another.to_s
       end
       alias eql? ==
         
@@ -207,7 +208,21 @@ module Resourceful
     
     @@known_fields = Set.new
     @@known_fields_lookup = Hash.new
-    
+
+    # Declares a common header field.  Header fields do not have to be
+    # defined this way but accessing them is easier, safer and faster
+    # if you do.  Declaring a field does the following things:
+    #
+    #  * defines accessor methods (e.g. `#content_type` and
+    #    `#content_type=`) on `Header`
+    #  
+    #  * defines constant that can be used to reference there field
+    #    name (e.g. `some_header[Header::CONTENT_TYPE]`)
+    #  
+    #  * includes the field in the appropriate *_fields groups (e.g. `Header.non_modifiable_fields`)
+    #
+    #  * provides improved multiple value parsing
+    #
     def self.header_field(name, options = {})
       hfd = FieldDesc.new(name, options)
       
@@ -219,11 +234,11 @@ module Resourceful
       include(hfd.accessor_module)
     end
     
-    def self.hop_by_hop_headers
+    def self.hop_by_hop_fields
       @@known_fields.select{|hfd| hfd.hop_by_hop?}
     end
     
-    def self.non_modifiable_headers
+    def self.non_modifiable_fields
       @@known_fields.reject{|hfd| hfd.modifiable?}
     end
     </diff>
      <filename>lib/resourceful/header.rb</filename>
    </modified>
    <modified>
      <diff>@@ -91,13 +91,6 @@ module Resourceful
       field_names.should have(3).items
     end
 
-    Spec::Matchers.define :have_pair do |name, value|
-      match do |header_hash|
-        header_hash.has_key?(name)
-        header_hash[name] == value
-      end
-    end
-    
     it &quot;should provide #to_hash as a way to dump the header fields&quot; do 
       Header.new('Accept' =&gt; &quot;this&quot;, :content_type =&gt; &quot;that&quot;, 'date' =&gt; 'today').to_hash.tap do |h|
         h.should have_pair('Accept', ['this'])
@@ -106,6 +99,16 @@ module Resourceful
       end
     end
 
+    it &quot;should provide a list of hop-by-hop fields&quot; do
+      Header.header_field('X-Hop-By-Hop-Header', :hop_by_hop =&gt; true)
+      Header.hop_by_hop_fields.should include('X-Hop-By-Hop-Header')
+    end
+
+    it &quot;should provide a list of not modified fields&quot; do
+      Header.header_field('X-Dont-Modify-Me', :modifiable =&gt; false)
+      Header.non_modifiable_fields.should include('X-Dont-Modify-Me')
+    end
+
     describe &quot;multi-valued fields&quot; do
       it &quot;should be instantiatable w/ repeated multi-valued header fields&quot; do
         Header.new('Accept' =&gt; ['application/foo', 'application/bar']).
@@ -139,6 +142,12 @@ module Resourceful
         end
       end
     end
-    
+
+    Spec::Matchers.define :have_pair do |name, value|
+      match do |header_hash|
+        header_hash.has_key?(name)
+        header_hash[name] == value
+      end
+    end    
   end
 end</diff>
      <filename>spec/resourceful/header_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>82b313f895ac597db060d126446c3edffbb8fdfb</id>
    </parent>
  </parents>
  <author>
    <name>Peter Williams</name>
    <email>pezra@youthful-indiscretion.local</email>
  </author>
  <url>http://github.com/paul/resourceful/commit/4da76a2d8b315a83e74e7038189e5df3a61362bb</url>
  <id>4da76a2d8b315a83e74e7038189e5df3a61362bb</id>
  <committed-date>2009-08-25T14:52:17-07:00</committed-date>
  <authored-date>2009-08-25T14:52:17-07:00</authored-date>
  <message>fixed bug with non-modifiable fields; and improved documentation.</message>
  <tree>990d8e698f1f3e02585ea77ed64bb1fbd3bfe1d9</tree>
  <committer>
    <name>Peter Williams</name>
    <email>pezra@youthful-indiscretion.local</email>
  </committer>
</commit>
