MCPcopy Index your code
hub / github.com/secdev/scapy / _ask_authorization

Method _ask_authorization

scapy/layers/http.py:1213–1229  ·  view source on GitHub ↗
(self, proxy, data)

Source from the content-addressed store, hash-verified

1211 raise self.AUTH()
1212
1213 def _ask_authorization(self, proxy, data):
1214 if proxy:
1215 self.send(
1216 HTTPResponse(
1217 Status_Code=b"407",
1218 Reason_Phrase=b"Proxy Authentication Required",
1219 Proxy_Authenticate=data,
1220 )
1221 )
1222 else:
1223 self.send(
1224 HTTPResponse(
1225 Status_Code=b"401",
1226 Reason_Phrase=b"Unauthorized",
1227 WWW_Authenticate=data,
1228 )
1229 )
1230
1231 @ATMT.receive_condition(AUTH, prio=1)
1232 def received_unauthenticated(self, pkt):

Callers 2

AUTHMethod · 0.95
AUTH_ERRORMethod · 0.95

Calls 2

sendMethod · 0.95
HTTPResponseClass · 0.85

Tested by

no test coverage detected