Exemple #1
0
    def http_request(self, req):
        url_instance = URL(req.get_full_url())
        url_instance.set_param(self._url_parameter)

        new_request = HTTPRequest(url_instance, headers=req.headers,
                                  origin_req_host=req.get_origin_req_host(),
                                  unverifiable=req.is_unverifiable(),
                                  retries=req.retries_left)
        return new_request
Exemple #2
0
    def http_request(self, req):
        url_instance = URL(req.get_full_url())
        url_instance.set_param(self._url_parameter)

        new_request = HTTPRequest(url_instance,
                                  headers=req.headers,
                                  origin_req_host=req.get_origin_req_host(),
                                  unverifiable=req.is_unverifiable(),
                                  retries=req.retries_left)
        return new_request
Exemple #3
0
    def test_set_params(self):
        u = URL('http://w3af.com/;id=1')
        u.set_param('file=2')

        self.assertEqual(u.get_params_string(), 'file=2')

        u = URL('http://w3af.com/xyz.txt;id=1?file=2')
        u.set_param('file=3')

        self.assertEqual(u.get_params_string(), 'file=3')
        self.assertEqual(u.get_path_qs(), '/xyz.txt;file=3?file=2')
Exemple #4
0
 def test_set_params(self):
     u = URL('http://w3af.com/;id=1')
     u.set_param('file=2')
     
     self.assertEqual(u.get_params_string(), 'file=2')
     
     u = URL('http://w3af.com/xyz.txt;id=1?file=2')
     u.set_param('file=3')
     
     self.assertEqual(u.get_params_string(), 'file=3')
     self.assertEqual(u.get_path_qs(), '/xyz.txt;file=3?file=2')
Exemple #5
0
    def http_request(self, req):
        url_instance = URL(req.get_full_url())
        url_instance.set_param(self._url_parameter)

        new_request = HTTPRequest(url_instance,
                                  method=req.get_method(),
                                  data=req.get_data(),
                                  headers=req.get_headers(),
                                  origin_req_host=req.get_origin_req_host(),
                                  unverifiable=req.is_unverifiable(),
                                  retries=req.retries_left,
                                  cookies=req.cookies,
                                  cache=req.get_from_cache,
                                  new_connection=req.new_connection,
                                  follow_redirects=req.follow_redirects,
                                  use_basic_auth=req.use_basic_auth,
                                  use_proxy=req.use_proxy,
                                  timeout=req.timeout)
        return new_request
Exemple #6
0
    def http_request(self, req):
        url_instance = URL(req.get_full_url())
        url_instance.set_param(self._url_parameter)

        new_request = HTTPRequest(url_instance,
                                  method=req.get_method(),
                                  data=req.get_data(),
                                  headers=req.get_headers(),
                                  origin_req_host=req.get_origin_req_host(),
                                  unverifiable=req.is_unverifiable(),
                                  retries=req.retries_left,
                                  cookies=req.cookies,
                                  cache=req.get_from_cache,
                                  new_connection=req.new_connection,
                                  follow_redirects=req.follow_redirects,
                                  use_basic_auth=req.use_basic_auth,
                                  use_proxy=req.use_proxy,
                                  timeout=req.timeout)
        return new_request