Functions | |
| request_line_path (request) | |
| The path of the request line as the server received it, when the server says what that was, and otherwise the path Flask decoded. | |
| webevidence (request) | |
| Get evidence from a web request (gets headers, cookies, session values, query parameters and the fields of a posted form, and the request itself as server.http-request). | |
| set_response_header (flowData, response) | |
| Set UACH response header in web response (sets Accept-CH header in response). | |
| javascript_response (pipeline, request, max_age_seconds=CLIENT_SIDE_MAX_AGE_SECONDS) | |
| Process a request for the client-side JavaScript and answer with the JavaScript the pipeline's JavaScriptBuilder writes, with the cache headers the web integration specification sets. | |
| json_response (pipeline, request, max_age_seconds=CLIENT_SIDE_MAX_AGE_SECONDS) | |
| Process a request from the client-side JavaScript and answer with the JSON the pipeline's JSONBundler writes, with the same cache headers as javascript_response. | |
| _client_side_response (pipeline, request, content, content_type, max_age_seconds) | |
| _uses (pipeline, key) | |
| _opaque_tag (pipeline, evidence) | |
| _if_none_match_matches (if_none_match, opaque_tag) | |
| _entity_tags (value) | |
| _vary (pipeline, request) | |
Variables | |
| int | CLIENT_SIDE_MAX_AGE_SECONDS = 1800 |
| str | _CACHE_CONTROL_AFTER_ERRORS = "private, no-cache" |
| _REVALIDATION_HEADERS | |
| _ENTITY_TAG = re.compile(r'(W/)?"([\x21\x23-\x7e\x80-\xff]*)"') | |
| _FIELD_NAME = re.compile(r"[!#$%&'*+.^_`|~0-9a-z-]+\Z") | |
| str | _OWS = " \t" |
Function Documentation
◆ _client_side_response()
|
protected |
◆ _entity_tags()
|
protected |
◆ _if_none_match_matches()
|
protected |
◆ _opaque_tag()
|
protected |
◆ _uses()
|
protected |
◆ _vary()
|
protected |
◆ javascript_response()
| javascript_response | ( | pipeline, | |
| request, | |||
| max_age_seconds = CLIENT_SIDE_MAX_AGE_SECONDS ) |
Process a request for the client-side JavaScript and answer with the JavaScript the pipeline's JavaScriptBuilder writes, with the cache headers the web integration specification sets.
The ETag is a weak entity tag, W/"...", hashed from the evidence the request supplied that the pipeline's elements accept. A GET or HEAD request whose If-None-Match header matches it, by the weak comparison of RFC 9110 section 13.1.2, gets a 304 without being processed, so a browser keeps a good copy while processing fails. A request by any other method whose If-None-Match matches, such as a POST to the JSON endpoint, gets 412 Precondition Failed. An If-None-Match that is neither "*" nor a list of entity tags matches nothing. Otherwise the response carries 'Cache-Control: max-age=1800, private', or the max age given, and the ETag, or 'Cache-Control: private, no-cache' and no ETag when processing recorded errors. Both carry a Vary header naming the headers the pipeline's elements accept, whether or not the request carried them.
@type pipeline: Pipeline
- Parameters
-
pipeline A pipeline holding the JavaScriptBuilder @type request: Request request The request for the JavaScript @type max_age_seconds: int max_age_seconds How long the browser may keep the response @rtype Response
- Returns
- The response to send
◆ json_response()
| json_response | ( | pipeline, | |
| request, | |||
| max_age_seconds = CLIENT_SIDE_MAX_AGE_SECONDS ) |
Process a request from the client-side JavaScript and answer with the JSON the pipeline's JSONBundler writes, with the same cache headers as javascript_response.
@type pipeline: Pipeline
- Parameters
-
pipeline A pipeline holding the JSONBundler @type request: Request request The request from the client-side JavaScript @type max_age_seconds: int max_age_seconds How long the browser may keep the response @rtype Response
- Returns
- The response to send
◆ request_line_path()
| request_line_path | ( | request | ) |
The path of the request line as the server received it, when the server says what that was, and otherwise the path Flask decoded.
◆ set_response_header()
| set_response_header | ( | flowData, | |
| response ) |
Set UACH response header in web response (sets Accept-CH header in response).
@type response: Response
- Parameters
-
response A Response object response_header_dict Dictionary containing response header key and values to be set @rtype response
- Returns
- A response object containing headers with non null values in response
◆ webevidence()
| webevidence | ( | request | ) |
Get evidence from a web request (gets headers, cookies, session values, query parameters and the fields of a posted form, and the request itself as server.http-request).
@type request: Request
- Parameters
-
request A Request object @rtype dict
- Returns
- A dictionary of web evidence that can be using in flowdata.evidence.add_from_dict()
Variable Documentation
◆ _CACHE_CONTROL_AFTER_ERRORS
|
protected |
◆ _ENTITY_TAG
|
protected |
◆ _FIELD_NAME
|
protected |
◆ _OWS
|
protected |
◆ _REVALIDATION_HEADERS
|
protected |
◆ CLIENT_SIDE_MAX_AGE_SECONDS
| int fiftyone_pipeline_core.web.CLIENT_SIDE_MAX_AGE_SECONDS = 1800 |
