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

Custom headers break if header value contains semicolons

    XMLWordPrintable

Details

    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulo.bras-obsolete@ez.no 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