You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dominik Siebel (JIRA)" <ji...@apache.org> on 2012/11/23 15:50:58 UTC
[jira] [Created] (SOLR-4110) Configurable Content-Type headers for
PHPResponseWriters and PHPSerializedResponseWriter
Dominik Siebel created SOLR-4110:
------------------------------------
Summary: Configurable Content-Type headers for PHPResponseWriters and PHPSerializedResponseWriter
Key: SOLR-4110
URL: https://issues.apache.org/jira/browse/SOLR-4110
Project: Solr
Issue Type: Improvement
Components: Response Writers
Affects Versions: 4.0
Reporter: Dominik Siebel
Priority: Minor
Fix For: 4.0.1
The *PHPResponseWriter* and *PHPSerializedResponseWriter* currently send a hard coded Content-Type header of _text/plain; charset=UTF-8_ although there are constants defining _text/x-php;charset=UTF-8_ and _text/x-php-serialized;charset=UTF-8_ which remain unused. This makes content type guessing on the client side quite complicated.
I already created a patch (from the branch_4x github branch) to use the respective constants and also added the possibility to configure the Content-Type header via solrconfig.xml (like in JSONResponseWriter).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-4110) Configurable Content-Type headers
for PHPResponseWriters and PHPSerializedResponseWriter
Posted by "Dominik Siebel (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506292#comment-13506292 ]
Dominik Siebel commented on SOLR-4110:
--------------------------------------
Upgrading from 4.0?
I don't see any harm in the ResponseWriters being configurable. JSONResponseWriter already is (as far as Content-Type header in concerned).
Sending _text/x-php;charset=UTF-8_ as default however might be an issue, yes (if anyone really relies on text/plain for PHP and PHPs).
But since the Content-Type header of the ResponseWriters would be configurable you could still overwrite the defaults in _solrconfig.xml_ just like the example does with the _JSONResponseWriter_:
{code xml}
<queryResponseWriter name="json" class="solr.JSONResponseWriter">
<!-- For the purposes of the tutorial, JSON responses are written as
plain text so that they are easy to read in *any* browser.
If you expect a MIME type of "application/json" just remove this override.
-->
<str name="content-type">text/plain; charset=UTF-8</str>
</queryResponseWriter>
{code}
> Configurable Content-Type headers for PHPResponseWriters and PHPSerializedResponseWriter
> ----------------------------------------------------------------------------------------
>
> Key: SOLR-4110
> URL: https://issues.apache.org/jira/browse/SOLR-4110
> Project: Solr
> Issue Type: Improvement
> Components: Response Writers
> Affects Versions: 4.0
> Reporter: Dominik Siebel
> Assignee: Mark Miller
> Priority: Minor
> Labels: 4.0.1_Candidate
> Fix For: 4.1, 5.0
>
> Attachments: SOLR-4110.patch
>
>
> The *PHPResponseWriter* and *PHPSerializedResponseWriter* currently send a hard coded Content-Type header of _text/plain; charset=UTF-8_ although there are constants defining _text/x-php;charset=UTF-8_ and _text/x-php-serialized;charset=UTF-8_ which remain unused. This makes content type guessing on the client side quite complicated.
> I already created a patch (from the branch_4x github branch) to use the respective constants and also added the possibility to configure the Content-Type header via solrconfig.xml (like in JSONResponseWriter).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-4110) Configurable Content-Type headers for
PHPResponseWriters and PHPSerializedResponseWriter
Posted by "Dominik Siebel (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dominik Siebel updated SOLR-4110:
---------------------------------
Attachment: SOLR-4110.patch
> Configurable Content-Type headers for PHPResponseWriters and PHPSerializedResponseWriter
> ----------------------------------------------------------------------------------------
>
> Key: SOLR-4110
> URL: https://issues.apache.org/jira/browse/SOLR-4110
> Project: Solr
> Issue Type: Improvement
> Components: Response Writers
> Affects Versions: 4.0
> Reporter: Dominik Siebel
> Priority: Minor
> Fix For: 4.0.1
>
> Attachments: SOLR-4110.patch
>
>
> The *PHPResponseWriter* and *PHPSerializedResponseWriter* currently send a hard coded Content-Type header of _text/plain; charset=UTF-8_ although there are constants defining _text/x-php;charset=UTF-8_ and _text/x-php-serialized;charset=UTF-8_ which remain unused. This makes content type guessing on the client side quite complicated.
> I already created a patch (from the branch_4x github branch) to use the respective constants and also added the possibility to configure the Content-Type header via solrconfig.xml (like in JSONResponseWriter).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Assigned] (SOLR-4110) Configurable Content-Type headers for
PHPResponseWriters and PHPSerializedResponseWriter
Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Miller reassigned SOLR-4110:
---------------------------------
Assignee: Mark Miller
> Configurable Content-Type headers for PHPResponseWriters and PHPSerializedResponseWriter
> ----------------------------------------------------------------------------------------
>
> Key: SOLR-4110
> URL: https://issues.apache.org/jira/browse/SOLR-4110
> Project: Solr
> Issue Type: Improvement
> Components: Response Writers
> Affects Versions: 4.0
> Reporter: Dominik Siebel
> Assignee: Mark Miller
> Priority: Minor
> Labels: 4.0.1_Candidate
> Fix For: 4.1, 5.0
>
> Attachments: SOLR-4110.patch
>
>
> The *PHPResponseWriter* and *PHPSerializedResponseWriter* currently send a hard coded Content-Type header of _text/plain; charset=UTF-8_ although there are constants defining _text/x-php;charset=UTF-8_ and _text/x-php-serialized;charset=UTF-8_ which remain unused. This makes content type guessing on the client side quite complicated.
> I already created a patch (from the branch_4x github branch) to use the respective constants and also added the possibility to configure the Content-Type header via solrconfig.xml (like in JSONResponseWriter).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-4110) Configurable Content-Type headers
for PHPResponseWriters and PHPSerializedResponseWriter
Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505695#comment-13505695 ]
Mark Miller commented on SOLR-4110:
-----------------------------------
What about back compat? How might this affect those upgrading from 4.0?
> Configurable Content-Type headers for PHPResponseWriters and PHPSerializedResponseWriter
> ----------------------------------------------------------------------------------------
>
> Key: SOLR-4110
> URL: https://issues.apache.org/jira/browse/SOLR-4110
> Project: Solr
> Issue Type: Improvement
> Components: Response Writers
> Affects Versions: 4.0
> Reporter: Dominik Siebel
> Priority: Minor
> Labels: 4.0.1_Candidate
> Fix For: 4.1, 5.0
>
> Attachments: SOLR-4110.patch
>
>
> The *PHPResponseWriter* and *PHPSerializedResponseWriter* currently send a hard coded Content-Type header of _text/plain; charset=UTF-8_ although there are constants defining _text/x-php;charset=UTF-8_ and _text/x-php-serialized;charset=UTF-8_ which remain unused. This makes content type guessing on the client side quite complicated.
> I already created a patch (from the branch_4x github branch) to use the respective constants and also added the possibility to configure the Content-Type header via solrconfig.xml (like in JSONResponseWriter).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-4110) Configurable Content-Type headers for
PHPResponseWriters and PHPSerializedResponseWriter
Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Miller updated SOLR-4110:
------------------------------
Fix Version/s: (was: 4.0.1)
5.0
4.1
Labels: 4.0.1_Candidate (was: )
> Configurable Content-Type headers for PHPResponseWriters and PHPSerializedResponseWriter
> ----------------------------------------------------------------------------------------
>
> Key: SOLR-4110
> URL: https://issues.apache.org/jira/browse/SOLR-4110
> Project: Solr
> Issue Type: Improvement
> Components: Response Writers
> Affects Versions: 4.0
> Reporter: Dominik Siebel
> Assignee: Mark Miller
> Priority: Minor
> Labels: 4.0.1_Candidate
> Fix For: 4.1, 5.0
>
> Attachments: SOLR-4110.patch
>
>
> The *PHPResponseWriter* and *PHPSerializedResponseWriter* currently send a hard coded Content-Type header of _text/plain; charset=UTF-8_ although there are constants defining _text/x-php;charset=UTF-8_ and _text/x-php-serialized;charset=UTF-8_ which remain unused. This makes content type guessing on the client side quite complicated.
> I already created a patch (from the branch_4x github branch) to use the respective constants and also added the possibility to configure the Content-Type header via solrconfig.xml (like in JSONResponseWriter).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Comment Edited] (SOLR-4110) Configurable Content-Type
headers for PHPResponseWriters and PHPSerializedResponseWriter
Posted by "Dominik Siebel (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506292#comment-13506292 ]
Dominik Siebel edited comment on SOLR-4110 at 11/29/12 7:41 AM:
----------------------------------------------------------------
Upgrading from 4.0?
I don't see any harm in the ResponseWriters being configurable. JSONResponseWriter already is (as far as Content-Type header in concerned).
Sending _text/x-php;charset=UTF-8_ as default however might be an issue, yes (if anyone really relies on text/plain for PHP and PHPs).
But since the Content-Type header of the ResponseWriters would be configurable you could still overwrite the defaults in _solrconfig.xml_ just like the example does with the _JSONResponseWriter_:
{code:xml}
<queryResponseWriter name="json" class="solr.JSONResponseWriter">
<!-- For the purposes of the tutorial, JSON responses are written as
plain text so that they are easy to read in *any* browser.
If you expect a MIME type of "application/json" just remove this override.
-->
<str name="content-type">text/plain; charset=UTF-8</str>
</queryResponseWriter>
{code}
was (Author: dsiebel):
Upgrading from 4.0?
I don't see any harm in the ResponseWriters being configurable. JSONResponseWriter already is (as far as Content-Type header in concerned).
Sending _text/x-php;charset=UTF-8_ as default however might be an issue, yes (if anyone really relies on text/plain for PHP and PHPs).
But since the Content-Type header of the ResponseWriters would be configurable you could still overwrite the defaults in _solrconfig.xml_ just like the example does with the _JSONResponseWriter_:
{code xml}
<queryResponseWriter name="json" class="solr.JSONResponseWriter">
<!-- For the purposes of the tutorial, JSON responses are written as
plain text so that they are easy to read in *any* browser.
If you expect a MIME type of "application/json" just remove this override.
-->
<str name="content-type">text/plain; charset=UTF-8</str>
</queryResponseWriter>
{code}
> Configurable Content-Type headers for PHPResponseWriters and PHPSerializedResponseWriter
> ----------------------------------------------------------------------------------------
>
> Key: SOLR-4110
> URL: https://issues.apache.org/jira/browse/SOLR-4110
> Project: Solr
> Issue Type: Improvement
> Components: Response Writers
> Affects Versions: 4.0
> Reporter: Dominik Siebel
> Assignee: Mark Miller
> Priority: Minor
> Labels: 4.0.1_Candidate
> Fix For: 4.1, 5.0
>
> Attachments: SOLR-4110.patch
>
>
> The *PHPResponseWriter* and *PHPSerializedResponseWriter* currently send a hard coded Content-Type header of _text/plain; charset=UTF-8_ although there are constants defining _text/x-php;charset=UTF-8_ and _text/x-php-serialized;charset=UTF-8_ which remain unused. This makes content type guessing on the client side quite complicated.
> I already created a patch (from the branch_4x github branch) to use the respective constants and also added the possibility to configure the Content-Type header via solrconfig.xml (like in JSONResponseWriter).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org