Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3487

Cannot override proxy.config.http.transaction_no_activity_timeout_in per remap rule for POST methold

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.1
    • 6.0.0
    • HTTP

    Description

      The configuration and test are as follows:

      remap.config:

          
      map /test1 http://httpbin.org
      map /test2 http://httpbin.org @plugin=conf_remap.so @pparam=proxy.config.http.transaction_no_activity_timeout_in=15
      

      records.config:

        
      CONFIG proxy.config.http.transaction_no_activity_timeout_in INT 5
      CONFIG proxy.config.diags.debug.enabled INT 1
      CONFIG proxy.config.diags.debug.tags STRING http_cs|http_ss|inactivity.*|socket
      
      test.py
      import time
      import logging
      import socket
      
      log = logging.getLogger(__name__)
      logging.basicConfig(level=logging.INFO)
      
      import SocketServer
      
      url1 = 'POST /test1/post HTTP/1.1\r\n'
      url2 = 'POST /test2/post HTTP/1.1\r\n'
      
      header1 = 'Host: 127.0.0.1\r\n'
      # last header need additional '\r\n'
      header2 = 'Content-Length: 10\r\n\r\n'
      
      body1 = '12345'
      body2 = '67890'
      
      def get_socket():
          s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          s.connect(('127.0.0.1', 8080))
          return s
      
      
      def test_global_config():
          s = get_socket()
          log.info('start test global config...')
          try:
              # before remap
              s.send(url1)
              time.sleep(2) # < global config
              s.send(header1)
              time.sleep(3) # < global config
              s.send(header2)
              # after remap
              time.sleep(2) # < global config
              s.send(body1)
              time.sleep(4) # < global config
              s.send(body2)
              log.info('test global config: pass!')
          except IOError:
              log.info('test global config: fail!')
      
          response = s.recv(4096)
          print response
      
      def test_per_remap_config():
          s = get_socket()
          log.info('start test per remap config...')
          try:
              # before remap
              s.send(url2)
              time.sleep(2) # < global config
              s.send(header1)
              time.sleep(3) # < global config
              s.send(header2)
              # after remap
              time.sleep(11) # < per remap config
              s.send(body1)
              time.sleep(13) # < per remap config
              s.send(body2)
              log.info('test per remap config: pass!')
          except IOError:
              log.info('test per remap config: fail!')
      
          response = s.recv(4096)
          print response
      
      if __name__ == '__main__':
          test_global_config()
          test_per_remap_config()
      

      test_global_config() would pass, but test_per_remap_config() fails. proxy.config.http.transaction_no_activity_timeout_in in per remap rule does not works.

      Attachments

        1. TS-3487.diff
          0.7 kB
          Feifei Cai

        Issue Links

          Activity

            People

              bcall Bryan Call
              ffcai Feifei Cai
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: