]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: drop dump_uri_from_state() which isn't used anymore. 19924/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 11 Jan 2018 12:16:31 +0000 (13:16 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 11 Jan 2018 12:16:31 +0000 (13:16 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/rgw/rgw_rest.cc
src/rgw/rgw_rest.h

index 400be38bbf3163e090b5371d85ed3bba12e9aadc..d7cc33225bb681eaf41733ae789a34e01ba76f1d 100644 (file)
@@ -439,31 +439,6 @@ void dump_bucket_from_state(struct req_state *s)
   }
 }
 
-void dump_uri_from_state(struct req_state *s)
-{
-  if (strcmp(s->info.request_uri.c_str(), "/") == 0) {
-
-    string location = "http://";
-    string server = s->info.env->get("SERVER_NAME", "<SERVER_NAME>");
-    location.append(server);
-    location += "/";
-    if (!s->bucket_name.empty()) {
-      if (!s->bucket_tenant.empty()) {
-        location += s->bucket_tenant;
-        location += ":";
-      }
-      location += s->bucket_name;
-      location += "/";
-      if (!s->object.empty()) {
-       location += s->object.name;
-       dump_header(s, "Location", location);
-      }
-    }
-  } else {
-    dump_header_quoted(s, "Location", s->info.request_uri);
-  }
-}
-
 void dump_redirect(struct req_state * const s, const std::string& redirect)
 {
   return dump_header_if_nonempty(s, "Location", redirect);
index 495827791a2a6de8253d6f4ca099437edaa8ddb8..e1ef6d1535c18151cff7cdc5533fa204b5be7172 100644 (file)
@@ -733,7 +733,6 @@ extern void list_all_buckets_end(struct req_state *s);
 extern void dump_time(struct req_state *s, const char *name, real_time *t);
 extern std::string dump_time_to_str(const real_time& t);
 extern void dump_bucket_from_state(struct req_state *s);
-extern void dump_uri_from_state(struct req_state *s);
 extern void dump_redirect(struct req_state *s, const string& redirect);
 extern bool is_valid_url(const char *url);
 extern void dump_access_control(struct req_state *s, const char *origin,