Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170093

HttpRequest.Builder does not validate method names passed to Builder.method()

XMLWordPrintable

      For instance:
      HttpRequest.newBuilder().method("foo", null)
      does not throw IllegalArgumentException.

      Maybe the spec should also say whether "CONNECT" should be accepted or not...

      Also the spec is probably missing some @throws in HttpRequest.Builder.build(), and the implementation might be missing
      some validation as well:
        - HttpRequest.Builder.build() doesn't throw any exception if method is null
        - HttpRequest.Builder.build() throws NPE if uri is null.

            chegar Chris Hegarty
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: