Traffic Server
  1. Traffic Server
  2. TS-290

Content-Type and Content-Language headers may be truncated in body factory responses

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.1
    • Component/s: Core
    • Labels:
      None

      Description

      In HttpBodyFactory.cc: HttpBodyFactory::fabricate_with_old_api, there are a few ink_strncpys with sizeof(content_language_out) and sizeof(content_type_out). Those are declared as char array args, but sizeof returns the size of pointer. This truncates the strings to 4 or 8 bytes depending on platform.

      HTTP/1.1 404 Not Found on Accelerator
      Date: Sat, 03 Apr 2010 07:37:47 GMT
      Connection: close
      Server: ATS/2.1.0
      Cache-Control: no-store
      >>>> Content-Type: text/ht <<<<
      Content-Language: en
      Content-Length: 240

        Activity

        Gavin made changes -
        Workflow jira [ 12503790 ] TS Workflow [ 12522402 ]
        Leif Hedstrom made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Steve Jiang made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Steve Jiang [ sjiang ]
        Fix Version/s 2.1.1 [ 12314995 ]
        Resolution Fixed [ 1 ]
        Steve Jiang created issue -

          People

          • Assignee:
            Steve Jiang
            Reporter:
            Steve Jiang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development