示例#1
0
 def status101(self):        # Switching Protocols
     if self.request \
     and not 'upgrade' in header_dict(self.request.headers).keys():
         self.add_note('', rs.UPGRADE_NOT_REQUESTED)
示例#2
0
 def status206(self):        # Partial Content
     if self.request \
     and not "range" in header_dict(self.request.headers).keys():
         self.add_note('', rs.PARTIAL_NOT_REQUESTED)
     if not self.response.parsed_headers.has_key('content-range'):
         self.add_note('header-location', rs.PARTIAL_WITHOUT_RANGE)
示例#3
0
 def status206(self) -> None:        # Partial Content
     if self.request and "range" not in list(header_dict(self.request.headers).keys()):
         self.add_note('', PARTIAL_NOT_REQUESTED)
     if 'content-range' not in self.response.parsed_headers:
         self.add_note('header-location', PARTIAL_WITHOUT_RANGE)
示例#4
0
 def status101(self) -> None:        # Switching Protocols
     if self.request and 'upgrade' not in list(header_dict(self.request.headers).keys()):
         self.add_note('status', UPGRADE_NOT_REQUESTED)
示例#5
0
 def status206(self) -> None:        # Partial Content
     if self.request and "range" not in list(header_dict(self.request.headers).keys()):
         self.add_note('', PARTIAL_NOT_REQUESTED)
     if 'content-range' not in self.response.parsed_headers:
         self.add_note('header-location', PARTIAL_WITHOUT_RANGE)
示例#6
0
 def status101(self) -> None:        # Switching Protocols
     if self.request and 'upgrade' not in list(header_dict(self.request.headers).keys()):
         self.add_note('status', UPGRADE_NOT_REQUESTED)
示例#7
0
 def response_start(status, phrase, headers):
     header = ", ".join(header_dict(headers).get(self.header, ['-']))
     self.emit("result", "OK", header, host, port)
     if x.tcp_conn:
         x.tcp_conn.close()