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)
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)
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)
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)
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()