Cross Origin Resource Sharing (CORS) Support

Bug #1002028 reported by nivardus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSRF
Fix Released
Wishlist
Unassigned

Bug Description

Following an announcement and discussion on the evergreen-dev mailing list ( http://georgialibraries.markmail.org/search/?q=cors#query:cors+page:1+mid:cuvqjauuvmbjzigt+state:results ) I have prepared a pull-request which includes my implementation of Cross Origin Resource Sharing support.

Updated pullrequest is available here: https://github.com/evergreen-library-system/OpenSRF/pull/2
The diff: https://github.com/evergreen-library-system/OpenSRF/pull/2.diff
Notes and detailed information available in the pull-request and commit message.

Original pullrequest: https://github.com/evergreen-library-system/OpenSRF/pull/1

Tags: pullrequest
Revision history for this message
nivardus (nivardus) wrote :

I've updated the bug description with new pull request URL.

description: updated
Revision history for this message
Dan Scott (denials) wrote :

In passing, this is a good overview of CORS, to help supplement the spec: http://www.html5rocks.com/en/tutorials/cors/

Revision history for this message
Bill Erickson (berick) wrote :

Doing a first pass review of the code...

In the following code:

+ char *host = origin;
+ if ( !strncmp(origin, "http://", 7) )
+ host = origin + 7;

Do we need to add a similar test for "https"?

I have not tested it yet, but the code looks good otherwise. I look forward to testing soon.
Thanks ! --bill

Galen Charlton (gmc)
Changed in opensrf:
milestone: none → 2.4.0-alpha
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master, along with a follow-up to add support for HTTPS and another one to set Access-Control-Expose-Headers. Thanks, Bennett!

Changed in opensrf:
status: New → Fix Committed
importance: Undecided → Wishlist
Galen Charlton (gmc)
Changed in opensrf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.