<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_jws_from_request(req):
 """ This function performs almost entirely bitjws authentication tasks. If valid bitjws message and signature headers are found, then the request will be assigned 'jws_header' and 'jws_payload' attributes. :param req: The flask request to load the jwt claim set from. """

    current_app.logger.info("loading request with headers: %s" % req.headers)
    if (("content-type" in req.headers and
         "application/jose" in req.headers['content-type']) or
        ("Content-Type" in req.headers and
         "application/jose" in req.headers['Content-Type'])):
        path = urlparse.urlsplit(req.url).path
        for rule in current_app.url_map.iter_rules():
            if path == rule.rule and req.method in rule.methods:
                dedata = req.get_data().decode('utf8')
                bp = current_app.bitjws.basepath
                req.jws_header, req.jws_payload = \
                    bitjws.validate_deserialize(dedata, requrl=bp + rule.rule)
                break