Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion 6.5.6.8 fails, appears to require if-none-match #61

Closed
PhillipWatts1012 opened this issue Jan 3, 2018 · 4 comments · Fixed by #64
Closed

Assertion 6.5.6.8 fails, appears to require if-none-match #61

PhillipWatts1012 opened this issue Jan 3, 2018 · 4 comments · Fixed by #64
Assignees

Comments

@PhillipWatts1012
Copy link

https://github.com/DMTF/spmf/blob/master/Specification.md
Request Header section
If-None-Match | No | No | RFC 7232

@billdodd
Copy link
Contributor

billdodd commented Jan 3, 2018

Can you elaborate on how this assertion is failing for you? (snippet of the log showing the message(s) generated would help)

The request header section quoted indicates that it is not required for the client to send the If-None-Match header. And then for the service behavior, states:

If this HTTP header is present, the service will only return the requested resource if the current ETag of that resource does not match the ETag sent in this header. If the ETag specified in this header matches the resource's current ETag, the status code returned from the GET will be 304.

Looking at the code in the assertion I don't immediately see a problem with the logic (though there may well be one). Just need a better understanding of how it is failing in order to diagnose.

@billdodd billdodd self-assigned this Jan 3, 2018
@PhillipWatts1012
Copy link
Author

PhillipWatts1012 commented Jan 3, 2018 via email

@PhillipWatts1012
Copy link
Author

PhillipWatts1012 commented Jan 4, 2018 via email

@billdodd
Copy link
Contributor

billdodd commented Jan 4, 2018

Thanks, Phillip.

I looked again at the spec and my statement above was incorrect. I said:

The request header section quoted indicates that it is not required for the client to send the If-None-Match header.

The "No" in the "Required" column, of course, means that the server is not required to understand and be able to process the header (in this case the If-None-Match header).

So, you were right, we should not fail the assertion if it returns a 200.

I'll fix that to log a WARN instead. And I also noticed that the assertion incorrectly mentions POST and tests for POST as an allowable operation. I'll clean that up as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants