Project

General

Profile

Actions

Bug #21875

closed

disableAllHeaderCode don't works withhout explizit usage of disableCharsetHeader

Added by Maik Preuß almost 15 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-12-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

without 'disableCharsetHeader = 1' a 'Content-Type' header will be generated regardless of 'disableAllHeaderCode'.

This disables the dynamic usage of header('Content-Type: ...) in extensions.

A workaround is to add
'disableCharsetHeader = 1' to the page.config
or to modify 'typo3\sysext\cms\tslib\class.tslib_fe.php:3374'.

if (!$this->config['config']['disableCharsetHeader']) {

=>

if (!$this->config['config']['disableCharsetHeader'] && !$this->config['config']['disableAllHeaderCode']) {

(issue imported from #M13078)


Files

13078.png (33.5 KB) 13078.png Administrator Admin, 2009-12-25 10:39
Actions #1

Updated by Benni Mack almost 15 years ago

Hey Maik,

you have an example on how to reproduce this? With what extensions do you have problems?

Thanks for your feedback.

Actions #2

Updated by Maik Preuß almost 15 years ago

I'm developing the T3Flex Extension.

This extension delivers TYPO3 content for Adobe Flex Widgets.
In this extension we have a plugin that delivers images in different formats.
The 'Content-Type:' header depends on the requested image.
The plugin defines its own page type with 'disableAllHeaderCode' = 1.

And in this plugin we need the old (or fixed) functionality.

To reproduce the issue, create an empty plugin that delivers the bytecode of an image.
Create a new page type like this:

t3fleximage = PAGE
t3fleximage {
typeNum = 9031

config {
disableAllHeaderCode = 1
disableCharsetHeader = 1
xhtml_cleaning = 0
admPanel = 0
}
10 = USER
10 {
userFunc = tx_t3flex_pi1->main
}
}

You will see, without 'disableCharsetHeader' TYPO will send a 'Content-type: text/html' header.

Unfortunatly the T3Flex extension is not publishet yet. Because of licensing problems. But in january we have to publish the extension.
This is one part of the contract with our customers.

Actions #3

Updated by Benni Mack almost 15 years ago

Hey Maik,

there are more headers that are sent with the HTTP response even when setting both options. See the screenshot attached.

We need to find out which need to be set at any time for a valid HTTP response and then unset the others as well.

However "disableAllHeaderCode" is use as well for AJAX communication. If we change this and people are using diableAllHeaderCode but still want the right charset to be sent (when sending HTML/text), how could they be able to send this header code as well then?

Actions #4

Updated by Maik Preuß almost 15 years ago

I think the best way will be map of all headers.
TYPO3 initializes this map with some standards and extensions can override the values in the map with a new method.
The items in the map will be sent immediately before all the content delivery.

The other possibility is sending the 'Content-type' header a little bit later (or earlier, I don't know the actual order). So, if the extension sends the header explicit with header function call this header will be prefered by the receiver.

Actions #5

Updated by Alexander Opitz over 11 years ago

  • Status changed from Accepted to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.3

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #6

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Benni Mack)
  • Is Regression set to No

No feedback for over 90 days.

Actions

Also available in: Atom PDF