sigee opened a new issue, #1588:
URL: https://github.com/apache/stormcrawler/issues/1588

   ### What would you like to be improved?
   
   According to https://www.ietf.org/rfc/rfc2616.txt (4.2 Message Headers), 
HTTP headers are case insensitive. 
   
   The Metadata should handle all the case sensitivities, not just lowercase.
   
   Example test case:
   ```java
       @Test
       void 
testGetFirstValueShouldReturnValueWithoutDependingOnCaseSensitivity() {
           Metadata metadata = new Metadata();
           metadata.addValue("location", "http://example.com";);
           Assertions.assertEquals("http://example.com";, 
metadata.getFirstValue("location"));
           Assertions.assertEquals("http://example.com";, 
metadata.getFirstValue("Location"));
           Assertions.assertEquals("http://example.com";, 
metadata.getFirstValue("LOCATION"));
   
           Metadata metadata2 = new Metadata();
           metadata2.addValue("Location", "http://example.com";);
           Assertions.assertEquals("http://example.com";, 
metadata2.getFirstValue("location"));
           Assertions.assertEquals("http://example.com";, 
metadata2.getFirstValue("Location"));
           Assertions.assertEquals("http://example.com";, 
metadata2.getFirstValue("LOCATION"));
   
           Metadata metadata3 = new Metadata();
           metadata3.addValue("LOCATION", "http://example.com";);
           Assertions.assertEquals("http://example.com";, 
metadata3.getFirstValue("location"));
           Assertions.assertEquals("http://example.com";, 
metadata3.getFirstValue("Location"));
           Assertions.assertEquals("http://example.com";, 
metadata3.getFirstValue("LOCATION"));
       }
   ```
   
   ### How should we improve?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@stormcrawler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to