|Summary:||Can't edit Content-Type Header|
|Product:||Apache httpd-2||Reporter:||Cyril Bonté <cyril.bonte>|
|Component:||mod_headers||Assignee:||Apache HTTPD Bugs Mailing List <bugs>|
|Attachments:||patch to allow to edit the Content-Type header|
Description Cyril Bonté 2009-12-20 16:13:00 UTC
Created attachment 24743 [details] patch to allow to edit the Content-Type header Currently, the "set" command allows to modify the Content-Type Header, but the "edit" one can't. Comparing the 2 portions of code, there's a special case in the "set" part to manage this specific header,which doesn't exist in the "edit" part. It would be useful to allow to edit the Content-Type (in my case, this is to remove the charset sent by tomcat for some devices).
Comment 1 Cyril Bonté 2009-12-21 03:28:10 UTC
Hi, I prefer to edit the report to change "enhancement" to "minor". As there's nothing in the documentation that explain this difference of behaviour between set and edit, it's maybe better to qualify it as a minor bug.
Comment 2 Nick Kew 2009-12-26 14:58:45 UTC
Your patch touches on some possible side-effects due to hacks in r->content_type. The assumption that it's not NULL could cause segfault (and will, if used with "early"). Committing a variant on your patch to trunk. It still risks side-effects, but these will be aligned with what, as you point out, we already have with Header set.
Comment 3 Cyril Bonté 2009-12-28 13:51:28 UTC
Ah yes, thanks for the fixed patch, it works well on a modified 2.2.14 version. Do you know if there's a chance it can be merged in the 2.2.x branch ?
Comment 5 Nick Kew 2010-07-05 15:25:34 UTC
Resolving this to LATER. Since ap_set_content_type has side-effects, I'm not going to propose the patch for backport. But trunk or patched mod_headers should work cleanly with 2.2 for anyone who wants it.