Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-91

bad constant names in o.a.h.protocol.HTTP

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 4.0-alpha5
    • 4.0-alpha6
    • HttpCore
    • None

    Description

      Class org.apache.http.protocol.HTTP defines some constants with inappropriate names:

      public static final String DATE_DIRECTIVE = "Date";
      public static final String SERVER_DIRECTIVE = "Server";

      neither of these is a "directive" in any way. They are plain, informational headers.

      public static final String EXPECT_DIRECTIVE = "Expect";
      public static final String CONN_DIRECTIVE = "Connection";

      While these are not termed "directive" in RFC 2616, they do have that character.

      I suggest to rename DATE_DIRECTIVE and SERVER_DIRECTIVE to *_HEADER or *_INFO.
      Within core, this would affect o.a.h.protocol, related tests, and NIO example NHttpReverseProxy.

      cheers,
      Roland

      Attachments

        Activity

          People

            rolandw Roland Weber
            rolandw Roland Weber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: