Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23107

Custom headers break if header value contains semicolons

    Details

    • Sprint:
      Castor UI S2, Castor Core S3

      Description

      according to documentation here:
      https://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/HTTPHeaderSettings/HeaderList

      a custom header can be defined using syntax:

      <HTTP header>[<eZ Publish path|module{/view}>]=<value>{;<depth>{;<level>}}
      

      but, using this syntax declaring an header such as:
      Content-Type:text/html; charset=iso-2022-jp

      is not possible. the semicolon( ; ) is part of the header itself, but acts as separator for the HeaderList setting, so the resulting header is always just

       Content-Type:text/html; 

      test case:
      set site.ini -> HTTPHeaderSettings to

      [HTTPHeaderSettings]
      CustomHeader=enabled
       
      HeaderList[]=Content-Type
      Content-Type[]
      Content-Type[/]=text/html; charset=UTF-16 #or other charset you like except uft-8
      

      result: content-type will not show the declared charset

        Issue Links

          Activity

          Show
          Damien Pobel (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-legacy/pull/1024
          Hide
          Gunnstein Lye added a comment -
          Show
          Gunnstein Lye added a comment - Merged [~damien.pobel@ez.no] 's PR #1024 to master: https://github.com/ezsystems/ezpublish-legacy/commit/2ad2127a9dc02d45fa129c3d0796b62ee6a40931
          Hide
          Eduardo Fernandes (Inactive) added a comment -

          QA Tested and Approved

          Show
          Eduardo Fernandes (Inactive) added a comment - QA Tested and Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Paulo Bras (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 15 minutes
                1h 15m

                  Agile