You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by pa...@apache.org on 2018/05/03 22:51:30 UTC

[trafficserver] branch master updated: traffic-replay: python request needs schema

This is an automated email from the ASF dual-hosted git repository.

paziz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 71ef611  traffic-replay: python request needs schema
71ef611 is described below

commit 71ef611642ded4cd32566c95f80dd9ee5fbd700e
Author: Persia Aziz <pe...@yahoo-inc.com>
AuthorDate: Thu May 3 16:18:18 2018 -0500

    traffic-replay: python request needs schema
---
 tests/tools/traffic-replay/NonSSL.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/tools/traffic-replay/NonSSL.py b/tests/tools/traffic-replay/NonSSL.py
index 60525bc..02f2194 100644
--- a/tests/tools/traffic-replay/NonSSL.py
+++ b/tests/tools/traffic-replay/NonSSL.py
@@ -93,7 +93,7 @@ def txn_replay(session_filename, txn, proxy, result_queue, request_session):
             body = createDummyBodywithLength(nBytes)
         #print("request session is",id(request_session))
         if method == 'GET':
-            r1 = request_session.request('GET', extractHeader.extract_GET_path(
+            r1 = request_session.request('GET', 'http://'+extractHeader.extract_host(txn_req_headers)+extractHeader.extract_GET_path(
                 txn_req_headers), headers=txn_req_headers_dict, data=body)
             responseHeaders = r1.headers
             responseContent = r1.content  # byte array
@@ -101,19 +101,19 @@ def txn_replay(session_filename, txn, proxy, result_queue, request_session):
             #print("len: {0} received {1}".format(responseHeaders['Content-Length'], responseContent))
 
         elif method == 'POST':
-            r1 = request_session.request('POST', extractHeader.extract_GET_path(
+            r1 = request_session.request('POST', 'http://'+extractHeader.extract_host(txn_req_headers)+extractHeader.extract_GET_path(
                 txn_req_headers), headers=txn_req_headers_dict, data=body)
             responseHeaders = r1.headers
             responseContent = r1.content
 
             #print("len: {0} received {1}".format(responseHeaders['Content-Length'], responseContent))
         elif method == 'HEAD':
-            r1 = request_session.request('HEAD', extractHeader.extract_GET_path(
+            r1 = request_session.request('HEAD', 'http://'+extractHeader.extract_host(txn_req_headers)+extractHeader.extract_GET_path(
                 txn_req_headers), headers=txn_req_headers_dict, data=body)
             responseHeaders = r1.headers
             responseContent = r1.content
         else:   # EXPERIMENTAL
-            r1 = request_session.request(method, extractHeader.extract_GET_path(
+            r1 = request_session.request(method, 'http://'+extractHeader.extract_host(txn_req_headers)+extractHeader.extract_GET_path(
                 txn_req_headers), headers=txn_req_headers_dict, data=body)
             responseHeaders = r1.headers
             responseContent = r1.content

-- 
To stop receiving notification emails like this one, please contact
paziz@apache.org.