Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 25 lines (18 sloc) 0.643 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
from base import *

MAGIC = "This shouldn't be sent"

CONF = """
vserver!1!rule!500!match = directory
vserver!1!rule!500!match!directory = /head-body
vserver!1!rule!500!handler = common
"""

class Test (TestBase):
    def __init__ (self):
        TestBase.__init__ (self, __file__)
        self.name = "Head doesn't include body"

        self.request = "HEAD /head-body/test HTTP/1.0\r\n"
        self.conf = CONF
        self.expected_error = 200
        self.forbidden_content = MAGIC

    def Prepare (self, www):
        self.Mkdir (www, "head-body")
        self.WriteFile (www, "head-body/test", 0444, MAGIC)

Something went wrong with that request. Please try again.