Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 31 lines (23 sloc) 0.867 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 25 26 27 28 29 30
from base import *

PATH_INFO = "/param1/param2/param3"

CONF = """
vserver!1!rule!690!match = directory
vserver!1!rule!690!match!directory = /pathinfo3
vserver!1!rule!690!handler = cgi
"""

class Test (TestBase):
    def __init__ (self):
        TestBase.__init__ (self, __file__)
        self.name = "PathInfo, cgi"

        self.request = "GET /pathinfo3/test%s HTTP/1.0\r\n" %(PATH_INFO)
        self.conf = CONF
        self.expected_error = 200
        self.expected_content = "PathInfo is: "+PATH_INFO

    def Prepare (self, www):
        self.Mkdir (www, "pathinfo3")
        self.WriteFile (www, "pathinfo3/test", 0555,
                        """#!/bin/sh

echo "Content-type: text/html"
echo ""
echo "PathInfo is: $PATH_INFO"
""")

Something went wrong with that request. Please try again.