Commits

Gregory Petukhov committed 3f1c05d

Fix logging outbound request headers in dump files

Comments (0)

Files changed (2)

 tests/tmp
 update_site.sh
 update_all.sh
+
+syntax:regexp
+^log$
 
         self.response = None
 
-        # ???
-        self.request_head = ''
-        self.request_log = ''
-        self.request_body = ''
+        self.request_head = None
+        self.request_log = None
+        self.request_body = None
 
         self.request_method = None
         self.trigger_extensions('reset')
             with open(self.config['log_file'], 'w') as out:
                 out.write(self.response.body)
 
-        self.save_dumps()
 
         if self.config['cookiefile']:
             self.dump_cookies(self.config['cookiefile'])
 
         self.copy_request_data()
 
+        # Should be called after `copy_request_data`
+        self.save_dumps()
+
         self._request_prepared = False
 
         # TODO: check max redirect count