GNUnet 0.22.2
httpdomain.httpdomain.HTTPXRefMethodRole Class Reference
Inheritance diagram for httpdomain.httpdomain.HTTPXRefMethodRole:
[legend]
Collaboration diagram for httpdomain.httpdomain.HTTPXRefMethodRole:
[legend]

Public Member Functions

def result_nodes (self, document, env, node, is_ref)
 
def result_nodes (self, document, env, node, is_ref)
 

Detailed Description

Definition at line 416 of file httpdomain.py.

Member Function Documentation

◆ result_nodes() [1/2]

def httpdomain.httpdomain.HTTPXRefMethodRole.result_nodes (   self,
  document,
  env,
  node,
  is_ref 
)

Definition at line 418 of file httpdomain.py.

418 def result_nodes(self, document, env, node, is_ref):
419 method = node[0][0].lower()
420 rawsource = node[0].rawsource
421 config = env.domains['http'].env.config
422 if method not in METHOD_REFS:
423 if not config['http_strict_mode']:
424 return [nodes.emphasis(method, method)], []
425 reporter = document.reporter
426 msg = reporter.error('%s is not valid HTTP method' % method,
427 line=node.line)
428 prb = nodes.problematic(method, method)
429 return [prb], [msg]
430 url = str(METHOD_REFS[method])
431 if not url:
432 return [nodes.emphasis(method, method)], []
433 node = nodes.reference(rawsource, method.upper(), refuri=url)
434 return [node], []
435
436

◆ result_nodes() [2/2]

def httpdomain.httpdomain.HTTPXRefMethodRole.result_nodes (   self,
  document,
  env,
  node,
  is_ref 
)

Definition at line 418 of file httpdomain.py.

418 def result_nodes(self, document, env, node, is_ref):
419 method = node[0][0].lower()
420 rawsource = node[0].rawsource
421 config = env.domains['http'].env.config
422 if method not in METHOD_REFS:
423 if not config['http_strict_mode']:
424 return [nodes.emphasis(method, method)], []
425 reporter = document.reporter
426 msg = reporter.error('%s is not valid HTTP method' % method,
427 line=node.line)
428 prb = nodes.problematic(method, method)
429 return [prb], [msg]
430 url = str(METHOD_REFS[method])
431 if not url:
432 return [nodes.emphasis(method, method)], []
433 node = nodes.reference(rawsource, method.upper(), refuri=url)
434 return [node], []
435
436

The documentation for this class was generated from the following files: