[ 
https://issues.apache.org/jira/browse/JENA-652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eetu Mäkelä updated JENA-652:
-----------------------------

    Attachment: fuseki-cors.patch

No, didn't have a patch at the time of writing, just looking at the code 
through viewvc. 

However, now I've implemented and tested the modifications on a checkout, and 
attach the corresponding patch. 

Besides adding the required header to the OPTIONS response of the /update 
endpoint, this patch also adds the relevant headers to the responses of the 
upload and REST endpoints.

An additional CORS header "Access-Control-Allow-Headers" is also added to all 
OPTIONS responses. Browsers have started to get picky also with the headers 
that cross-origin requests can have, and this header now casts a sufficiently 
wide common net for Ajax applications (the header unfortunately cannot accept 
wildcards).


> Fuseki SPARQL update endpoint does not set CORS headers on an OPTIONS request
> -----------------------------------------------------------------------------
>
>                 Key: JENA-652
>                 URL: https://issues.apache.org/jira/browse/JENA-652
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Fuseki
>    Affects Versions: Fuseki 1.0.1
>            Reporter: Eetu Mäkelä
>            Priority: Minor
>         Attachments: fuseki-cors.patch
>
>
> Fuseki does not return CORS Allow headers for an OPTIONS request on the 
> update endpoint, thus disallowing SPARQL UPDATE requests to be made from 
> HTML5 web applications.
> This can probably be fixed just by adding a call to 
> {{setCommonHeaders(response);}} into the {{doOptions}} -method of 
> {{org.apache.jena.fuseki.servlets.SPARQL_Update}}, identically to how this is 
> handled in {{org.apache.jena.fuseki.servlets.SPARQL_Query}} .



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to