Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-1668

PUT with malformed etag generates Internal Server Error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Fedora 4.3.0
    • Fix Version/s: Fedora 4.4.0
    • Component/s: f4-ldp
    • Labels:
      None
    • Sprint:
      Sprint 2015 - 9

      Description

      If the etag value is returned to the server in If-Match without the quotes, then the server raises an uncaught exception:

      $ curl -XPUT http://localhost:8080/rest/foo
      http://localhost:8080/rest/foo

      $ curl -I http://localhost:8080/rest/foo
      ...
      ETag: "2c35ae443a20eac5e1cc44d451371485a6e6ff4f"
      ...

      $ curl -XPUT -H "If-Match: 2c35ae443a20eac5e1cc44d451371485a6e6ff4f" http://localhost:8080/rest/foo
      ...
      org.glassfish.jersey.message.internal.HeaderValueException: Unable to parse "If-Match" header value: "2c35ae443a20eac5e1cc44d451371485a6e6ff4f"
      at org.glassfish.jersey.message.internal.InboundMessageContext.exception(InboundMessageContext.java:333)

      It could give 400 or 412, preferably with a nice error message saying that the quotes are needed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                awoods Andrew Woods
                Reporter:
                azaroth42 Rob Sanderson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: