[prev in list] [next in list] [prev in thread] [next in thread]
List: lucene-dev
Subject: [jira] [Commented] (SOLR-12282) JSONResponseWriter should return Content-Type application/javascript
From: "Markus Schuch (JIRA)" <jira () apache ! org>
Date: 2018-04-30 18:57:00
Message-ID: JIRA.13155636.1524812683000.17903.1525114620195 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/SOLR-12282?page=com.atlassian.jira.plugin. \
system.issuetabpanels:comment-tabpanel&focusedCommentId=16458887#comment-16458887 ]
Markus Schuch commented on SOLR-12282:
--------------------------------------
Good point. Browser support for CORS looks way better than last time i checked \
([https://caniuse.com/#feat=cors).]
> JSONResponseWriter should return Content-Type application/javascript for JSONP \
> requests
> ---------------------------------------------------------------------------------------
>
> Key: SOLR-12282
> URL: https://issues.apache.org/jira/browse/SOLR-12282
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Response Writers
> Reporter: Markus Schuch
> Priority: Minor
> Attachments: SOLR-12282.patch
>
>
> The JSONResponseWriter handles two purposes:
> * writing JSON responses (wt=json)
> * writing JSONP responses, namely JSON responses wrapped by a JavaScript function \
> (wt=json&json.wrf=myFunction) The response writer returns the same Content-Type in \
> both cases. (default: application/json) But for JSONP the correct Content-Type \
> would be "application/javascript". The response type is configurable, but it is \
> currently not possible to return the correct Content-Type in both cases with one \
> configuration at the same time. The attached patch changes the default Content-Type \
> to {{application/javascript; charset=utf-8}} for responses with wrapper functions \
> (JSONP). If param {{content-type}} is configured, this Content-Type will be \
> returned for both JSON and JSONP to ensure backward compatibility.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic