From: Yehuda Sadeh Date: Sun, 31 Mar 2013 06:28:18 +0000 (-0700) Subject: Makefile.am: change some cors rules X-Git-Tag: v0.62~124^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3c52b8bbf54360bec11d155b493a896eb2e7a64d;p=ceph.git Makefile.am: change some cors rules The cors unitest should be a standalone test (not part of the make unitests) as it requires having a running gateway and needs input params to run correctly. Also update missing header files. Signed-off-by: Yehuda Sadeh --- diff --git a/src/Makefile.am b/src/Makefile.am index 6d198a1b3a98..b93960be5ec4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -371,8 +371,8 @@ librgw_a_SOURCES = \ rgw/rgw_gc.cc \ rgw/rgw_multi_del.cc \ rgw/rgw_env.cc \ - rgw/rgw_cors.cc \ - rgw/rgw_cors_s3.cc + rgw/rgw_cors.cc \ + rgw/rgw_cors_s3.cc librgw_a_CFLAGS = ${CRYPTO_CFLAGS} ${AM_CFLAGS} librgw_a_CXXFLAGS = -Woverloaded-virtual ${AM_CXXFLAGS} noinst_LIBRARIES += librgw.a @@ -876,11 +876,11 @@ unittest_texttable_LDADD = librados.la ${UNITTEST_LDADD} unittest_texttable_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} check_PROGRAMS += unittest_texttable -unittest_cors_SOURCES = test/test_cors.cc -unittest_cors_LDFLAGS = libglobal.la -unittest_cors_LDADD = librados.la librgw.a ${UNITTEST_LDADD} ${UNITTEST_STATIC_LDADD} -lcryptopp -lcurl -luuid -lexpat -unittest_cors_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} -check_PROGRAMS += unittest_cors +ceph_test_cors_SOURCES = test/test_cors.cc +ceph_test_cors_LDFLAGS = libglobal.la +ceph_test_cors_LDADD = librados.la librgw.a ${UNITTEST_LDADD} ${UNITTEST_STATIC_LDADD} -lcryptopp -lcurl -luuid -lexpat +ceph_test_cors_CXXFLAGS = ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS} +bin_DEBUGPROGRAMS += ceph_test_cors ceph_test_librbd_SOURCES = test/librbd/test_librbd.cc test/librados/test.cc ceph_test_librbd_LDADD = librbd.la librados.la ${UNITTEST_STATIC_LDADD} @@ -1966,6 +1966,9 @@ noinst_HEADERS = \ rgw/rgw_xml.h\ rgw/rgw_cache.h\ rgw/rgw_common.h\ + rgw/rgw_cors.h\ + rgw/rgw_cors_s3.h\ + rgw/rgw_cors_swift.h\ rgw/rgw_string.h\ rgw/rgw_formats.h\ rgw/rgw_html_errors.h\ diff --git a/src/test/test_cors.cc b/src/test/test_cors.cc index 719dcb81656e..dad189bb7d47 100644 --- a/src/test/test_cors.cc +++ b/src/test/test_cors.cc @@ -121,7 +121,7 @@ int test_cors_helper::extract_input(int argc, char *argv[]){ void test_cors_helper::set_response(char *r){ string sr(r), h, v; - unsigned off = sr.find(": "); + size_t off = sr.find(": "); if(off != string::npos){ h.assign(sr, 0, off); v.assign(sr, off + 2, sr.find("\r\n") - (off+2)); @@ -171,7 +171,7 @@ static void calc_hmac_sha1(const char *key, int key_len, static int get_s3_auth(string method, string creds, string date, string res, string& out){ string aid, secret, auth_hdr; - unsigned off = creds.find(":"); + size_t off = creds.find(":"); out = ""; if(off != string::npos){ aid.assign(creds, 0, off);