-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Bug: X-Result-Count
is always the limit
when limit
is specified
#9422
Comments
Facing the same issue in a project involving MISP at my company. Further investigation on our end has led us to the following conclusions. 1. Most of the time,
|
incredible sleuthing! and nice suggestions for some quick wins. perhaps that will help the team address some of this more quickly. thank you! |
Actual behavior
on /attributes/restSearch endpoint when specifying a
limit
param, theX-Result-Count
response header is usuallylimit
+1 (the +1 seems odd).Expected behavior
I would expect that
X-Result-Count
always contains the total number of overall results for pagination.Steps to reproduce
See that the
X-Result-Count
= 1001Version
2.4.178
Operating System
CentOS
Operating System version
Stream 8
PHP version
7.4
Browser
Chrome, Edge
Browser version
119.0.2151.72 (64-bit)
Relevant log output
No response
Extra attachments
This appears to be similar to #7950 and #4161.
Additionally, correcting this behavior would, I believe, resolve #9129 since you could specify a
limit
of0
or1
to effectively get the same end result. That, or giving the /attributes/restSearch endpoint the ability to take the samemetadata
flag as the /events/restSearch endpoint.Code of Conduct
The text was updated successfully, but these errors were encountered: