Feature #56236

Allow multiple headers of the same type in config.additionalHeaders

Added by Marco Huber over 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-02-24
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Sometimes you need to set multiple headers of the same type via config.additionalHeaders. As an example, I tried to set the X-Robots-Tag.

mypage.config.additionalHeaders = X-Robots-Tag: noarchive|X-Robots-Tag: nosnippet

But only the last one is delivered, becaus you can't set the replace parameter of the PHP function header(). (See http://php.net/header)


Related issues

Precedes TYPO3 Core - Feature #23494: config.additionalHeaders - add stdWrap Rejected 2014-02-25

Associated revisions

Revision a5f57f0d (diff)
Added by Marco Huber almost 5 years ago

[FEATURE] Allow multiple HTTP headers of the same type in TS

Allows multiple HTTP headers of the same type in
config.additionalHeaders by extending the configuration
possibilities:

mypage.config.additionalHeaders {
10 {
#the header string
header = WWW-Authenticate: Negotiate

#replace previous headers with the same name
#optional, default is 1 (yes)
replace = 0

#force the HTTP response code
#optional
httpResponseCode = 401
}
}

See also: http://php.net/header

Resolves: #56236
Releases: master
Change-Id: I25b4c755459b3ad718624426a32f217055c189e5
Reviewed-on: http://review.typo3.org/27814
Reviewed-by: Benjamin Mack <>
Tested-by: Benjamin Mack <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision 2124bba4 (diff)
Added by Philipp Gampe about 2 years ago

[FEATURE] Add stdWrap to config.additionalHeaders

Add stdWrap to the elements header, replace and httpResponseCode.

Resolves: #23494
Related: #56236
Releases: master
Change-Id: I3adbb63ec66097775c041a3a18299ad48f6df7aa
Reviewed-on: https://review.typo3.org/50142
Tested-by: TYPO3com <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Joerg Boesche <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Henning Liebe <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

History

#1 Updated by Marco Huber over 5 years ago

So perhaps we could extend the configuration to support all parameters:

mypage.config.additionalHeaders {
    10 {
        #the header string
        string = X-Robots-Tag: noarchive
        #default for replace is 1
        replace = 0
        #default for httpResponseCode is NULL (unset)
        httpResponseCode = 
    }
    20 {
        #the header string
        string = X-Robots-Tag: nosnippet
        #default for replace is 1
        replace = 0
        #default for httpResponseCode is NULL (unset)
        httpResponseCode = 
    }
}

#2 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27814

#3 Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27814

#4 Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27814

#5 Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27814

#6 Updated by Gerrit Code Review almost 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27814

#7 Updated by Wouter Wolters almost 5 years ago

  • Status changed from Under Review to Resolved

#8 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF