- 31 Oct, 2021 5 commits
-
-
Kevin Morris authored
If the If-None-Match header is supplied with a previously obtained ETag from the same query, a 304 Not Modified is returned with no content. This allows clients to completely leverage the ETag header. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Since we're in the hot path, a constant re.compiled JSONP_EXPR is defined for checks against the callback. Additionally, reorganized `content_type` and `content` to avoid performing a DB query when we encounter a regex mismatch. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This change introduces alternate rendering of text/javascript JSONP-compatible callback content. The `examples/jsonp.html` HTML document can be used to test this functionality against a running aurweb server. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This commit introduces a PackageSearch-derivative class: `RPCSearch`. This derivative modifies callback behavior of PackageSearch to suit RPC searches, including [make|check|opt]depends `by` types. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 30 Oct, 2021 2 commits
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
The ETag header can be used for client-side caching. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 21 Oct, 2021 3 commits
-
-
Kevin Morris authored
New configuration options: - `[ratelimit] cache` - A boolean indicating whether we should use configured cache (1) or database (0) for ratelimiting. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This reworks the base implementation of the RPC to use a class called RPC for handling of requests. Took a bit of a different approach than PHP in terms of exposed methods, but it does end up achieving the same goal, with one additional error: "Request type '{type}' is not yet implemented." For FastAPI development, we'll stick with: - If the supplied 'type' argument has an alias mapping in RPC.ALIASES, we convert the type argument over to its alias before doing anything. Example: 'info' is aliased to 'multiinfo', so when a user requests type=info, it is converted to type=multiinfo. - If the type does not exist in RPC.EXPOSED_TYPES, the following error is produced: "No request type/data specified." - If the type **does** exist in RPC.EXPOSED_TYPES, but does not have an implemented `RPC._handle_{type}_type` function, the following error is produced: "Request type '{type}' is not yet implemented." Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This feature of RPC is required to take advantage of javascript typeahead. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 17 Sep, 2021 2 commits
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
PHP does this, we should persist the behavior here for v=5. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 16 Sep, 2021 1 commit
-
-
Hunter Wittenborn authored
-
- 12 Sep, 2021 1 commit
-
-
Hunter Wittenborn authored
-