File: send_header.py

package info (click to toggle)
wget 1.25.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 26,088 kB
  • sloc: ansic: 109,273; sh: 7,660; perl: 6,790; python: 5,466; makefile: 602; lex: 167; sed: 16
file content (12 lines) | stat: -rw-r--r-- 335 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
from conf import rule

""" Rule: SendHeader
Have the server send custom headers when responding to a request for the file
this rule is applied to. The header_obj object is expected to be dictionary
mapping headers to their contents. """


@rule()
class SendHeader:
    def __init__(self, header_obj):
        self.headers = header_obj