Hello everyone,
I'm trying to configure the DSpace REST webapp to serve content with the
Accept-Range header.
I stumbled upon this thread:
http://stackoverflow.com/questions/36665305/dspace-rest-api-creating-a-new-top-level-communtity-403-preflight-response-i
Which helped me with a cross-origin problem.
However content is always server with 200 code and no Accept-Range header
is present.
*This is my current CorsFilter in web.xml in webapps/rest/WEB-INF:*
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.headers</param-name>
<param-value>Range</param-value>
</init-param>
<init-param>
<param-name>cors.exposed.headers</param-name>
<param-value>Accept-Ranges,Content-Encoding,Content-Length,Content-Range</param-value>
</init-param>
<init-param>
<param-name>cors.support.credentials</param-name>
<param-value>true</param-value>
</init-param>
</filter>
*These are the response headers I'm getting:*
1. Access-Control-Allow-Credentials:
true
2. Access-Control-Allow-Origin:
https://mydomain.localhost
3. Access-Control-Expose-Headers:
Content-Length,Content-Encoding,Accept-Ranges,Content-Range
4. Content-Type:
application/pdf
5. Date:
Mon, 20 Jun 2016 17:35:30 GMT
6. Server:
Apache-Coyote/1.1
7. Strict-Transport-Security:
max-age=31536000; includeSubDomains
8. Transfer-Encoding:
chunked
*I'm looking for something like this:*
1. Accept-Ranges:
bytes
2. Content-Length:
9255911
3. Content-Type:
application/pdf
4. Date:
Mon, 20 Jun 2016 17:35:17 GMT
5. ETag:
"8d3be7-535b7cf7e4700"
6. Last-Modified:
Mon, 20 Jun 2016 16:01:00 GMT
7. Server:
Apache/2.4.10 (Debian) PHP/5.6.12
8. Strict-Transport-Security:
max-age=31536000; includeSubDomains
Any help is greatly appreciated.
Thank you,
Pedro Amorim
--
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.