diff --git a/bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_api.py b/bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_api.py index b0be50d0..cecf45f8 100644 --- a/bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_api.py +++ b/bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_api.py @@ -330,8 +330,10 @@ def special_bubble_response(flow): elif flow.request.method == 'POST': if bubble_log.isEnabledFor(DEBUG): bubble_log.debug('special_bubble_response: special bubble request: POST content is '+str(flow.request.content)) - headers['Content-Length'] = str(len(flow.request.content)) + if flow.request.content: + headers['Content-Length'] = str(len(flow.request.content)) response = requests.post(uri, data=flow.request.content, headers=headers, stream=True) + else: if bubble_log.isEnabledFor(WARNING): bubble_log.warning('special_bubble_response: special bubble request: method '+flow.request.method+' not supported') diff --git a/bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_flex.py b/bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_flex.py index 4a76d20d..95d72968 100644 --- a/bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_flex.py +++ b/bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_flex.py @@ -75,7 +75,7 @@ def process_flex(flex_host, flow, router): try: response = requests.request(method, url, headers=request_headers, - timeout=(15, 15), + timeout=(20, 120), stream=True, data=request_body, # use the original request body, if there is one proxies=proxies,