]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Makefile.am: change some cors rules
authorYehuda Sadeh <yehuda@inktank.com>
Sun, 31 Mar 2013 06:28:18 +0000 (23:28 -0700)
committerSage Weil <sage@inktank.com>
Mon, 1 Apr 2013 04:51:59 +0000 (21:51 -0700)
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 <yehuda@inktank.com>
src/Makefile.am
src/test/test_cors.cc

index 6d198a1b3a98b2307120eb65abc43bc08ce39447..b93960be5ec49907eb046f4f35f24dc823485c5b 100644 (file)
@@ -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\
index 719dcb81656e0cc039c9ce41663c9bea78c9078b..dad189bb7d47de5fb0841ba5e471014031d7802f 100644 (file)
@@ -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);