summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/send-error-report11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/send-error-report b/scripts/send-error-report
index 3528cf93a9..0ed7cc905e 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -62,7 +62,7 @@ def edit_content(json_file_path):
62 62
63def prepare_data(args): 63def prepare_data(args):
64 # attempt to get the max_log_size from the server's settings 64 # attempt to get the max_log_size from the server's settings
65 max_log_size = getPayloadLimit("https://"+args.server+"/ClientPost/JSON") 65 max_log_size = getPayloadLimit(args.protocol+args.server+"/ClientPost/JSON")
66 66
67 if not os.path.isfile(args.error_file): 67 if not os.path.isfile(args.error_file):
68 log.error("No data file found.") 68 log.error("No data file found.")
@@ -132,9 +132,9 @@ def send_data(data, args):
132 headers={'Content-type': 'application/json', 'User-Agent': "send-error-report/"+version} 132 headers={'Content-type': 'application/json', 'User-Agent': "send-error-report/"+version}
133 133
134 if args.json: 134 if args.json:
135 url = "https://"+args.server+"/ClientPost/JSON/" 135 url = args.protocol+args.server+"/ClientPost/JSON/"
136 else: 136 else:
137 url = "https://"+args.server+"/ClientPost/" 137 url = args.protocol+args.server+"/ClientPost/"
138 138
139 req = urllib.request.Request(url, data=data, headers=headers) 139 req = urllib.request.Request(url, data=data, headers=headers)
140 try: 140 try:
@@ -187,6 +187,11 @@ if __name__ == '__main__':
187 help="Return the result in json format, silences all other output", 187 help="Return the result in json format, silences all other output",
188 action="store_true") 188 action="store_true")
189 189
190 arg_parse.add_argument("--no-ssl",
191 help="Use http instead of https protocol",
192 dest="protocol",
193 action="store_const", const="http://", default="https://")
194
190 195
191 196
192 args = arg_parse.parse_args() 197 args = arg_parse.parse_args()