]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: with CORS support
authorBabu Shanmugam <anbu@enovance.com>
Tue, 5 Mar 2013 03:52:55 +0000 (09:22 +0530)
committerSage Weil <sage@inktank.com>
Mon, 1 Apr 2013 04:51:48 +0000 (21:51 -0700)
commitf165049cbafd54c70d17777527e85b6fe26b1df2
tree8b38a2463aaa82e2dc7e0cfdb73adc309968b053
parentce8793ce3bd8b816aa6083175d6dd1c614a71aae
rgw: with CORS support

With CORS test cases

1. Added license headers to the cors files
2. SIWFT POST metadata for cors will replace the old cors configuration
3. Fixed a buf in rgw_cors_swift.h

With Yehuda's review comments along with some fixes;
1. If the origin is allowed only for https, we should not approve the same host for http requests
2. Accounted for hostname situtation like www.www.org, or www.wowwww.com or www.*
3. Replaced atoi with strtol
4. Have a centralized place for parsing host names, hence avoiding duplicates

Checked certain senarios with amazon S3 and made changes accordingly

With some fixes in rgw_cors.cc and str_list.cc

Removing the whitespace auto-append to the delimiters in get_str_list(), added white spaces delimiters in is_string_in_set()
21 files changed:
src/Makefile.am
src/common/str_list.cc
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_cors.cc [new file with mode: 0644]
src/rgw/rgw_cors.h [new file with mode: 0644]
src/rgw/rgw_cors_s3.cc [new file with mode: 0644]
src/rgw/rgw_cors_s3.h [new file with mode: 0644]
src/rgw/rgw_cors_swift.h [new file with mode: 0644]
src/rgw/rgw_html_errors.h
src/rgw/rgw_main.cc
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.h
src/rgw/rgw_rest_swift.cc
src/rgw/rgw_rest_swift.h
src/rgw/rgw_xml.cc
src/test/test_cors.cc [new file with mode: 0644]