Browse Source

allow flex POST with no content, extend flex timeout

pull/51/head
Jonathan Cobb 4 years ago
parent
commit
81a6c63cef
2 changed files with 4 additions and 2 deletions
  1. +3
    -1
      bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_api.py
  2. +1
    -1
      bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_flex.py

+ 3
- 1
bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_api.py View File

@@ -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')


+ 1
- 1
bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_flex.py View File

@@ -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,


Loading…
Cancel
Save