-
Notifications
You must be signed in to change notification settings - Fork 108
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
PR #3122 broke support for APIs using the HEAD
method
#3135
Comments
I noodled a bit on this quite a while back, and decided that for the APIs we had, duplicating code in order to get a slightly more efficient I think that the one exception might be I really don't want to duplicate the code to generate "just headers" unless there's a clear advantage over the default "truncated I decided to defer even worrying about this until we had a clearly delineated example. However the easiest way to enable it would probably be to drop the "abstract" |
Certainly duplicating code is a bad thing in general, so I understand the sentiment, but I think it is a bit misplaced. This assumes that we really do want to allow a Further, looking through the existing APIs (enumerated below), I don't see enough APIs that return header values to warrant keeping this default of automatic In fact, I think we can survive just fine without a Let's look at the APIs available answering to the
Given this list, all of these APIs that would support There has to be a good reason to provide a behavior for methods of APIs. Aside from the inventory APIs, if we can come up with a good reason for those to exist, great, I'd be all for it. But we need to default to not using ANY server resources unless it is truly warranted. |
@portante, which problem are you trying to solve? The previous arrangement (as I understand it...) provided implicit support for However, you indicated that the implicit I understand that the implicit |
PR #3122 broke support for APIs using the
HEAD
method. Below is the discussion context from that PR held post merge.Does this work? This worries me, and seems like we no longer have
HEAD
implementations for ourGET
APIs. Normally, Flask implements aHEAD
as aGET
and discards the response payload (returning only headers). I don't think it does that if thehead
method is implemented, which you're now doing anywhere, so I think aHEAD
ought to now go through to the fallback (not implemented) "abstract"_head
.While I'm not against the idea of being able to implement a specialized
_head
I don't think this way will work.Or at least, I know that a
HEAD /api/v1/datasets/list
worked before, and I'm not confident that it'll work with these changes. (In fact, I don't see how it could.)Originally posted by @dbutenhof in #3122 (comment)
The text was updated successfully, but these errors were encountered: