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

Method to query content length before exploration #146

Closed
farshidtz opened this issue Mar 25, 2021 · 2 comments · Fixed by #219
Closed

Method to query content length before exploration #146

farshidtz opened this issue Mar 25, 2021 · 2 comments · Fixed by #219
Assignees

Comments

@farshidtz
Copy link
Member

The spec should include mechanisms to know the response size before retrieving TD(s) from a device or directory.

For HTTP, this should be as simple as making a HEAD request to get the Content-Length. This is applicable to:

  • Self-describing devices. Small consumers should know if they can accommodate the whole TD or should instead make a selection query Peer-to-Peer Queries Endpoint in Producers #132
  • Retrieving a single TD from a directory. Same as above.
  • Retrieving multiple or all TDs. Consumers should be able to know if the response is too large for them to process and if they should adjust their query. Listing with chunked transfer #145
@mmccool
Copy link
Contributor

mmccool commented May 17, 2021

  • We need to add a "HEAD" request to all endpoints
  • Not clear how to add this to the TD; we could do it outside the TD spec (e.g. add an assertion that HEAD should be supported for a certain set of interactions under HTTP, and to include Content-Length)
  • How does this interact with pagination? A: should be exactly what we would returned for a GET; just the headers, just no body
  • Should raise an issue to consider how to include this in the TD spec

@mmccool
Copy link
Contributor

mmccool commented May 17, 2021

@farshidtz will add a PR; will just add an assertion

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