All of lore.kernel.org
 help / color / mirror / Atom feed
From: cclien <cclien@gmail.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH] rgw: Lighttpd compatibity.
Date: Thu, 17 Feb 2011 19:20:02 +0800	[thread overview]
Message-ID: <AANLkTikEd8UUyy3ncf2DiDqR1Aa0UNDy3AVVGnVSyCxK@mail.gmail.com> (raw)

Hi all

I just tried to deploy a rados gateway with Lighttpd.
But it have some trouble parsing object names.

Here's what I found in debug log on the non-working copy:
    RADOS S3 Gateway: SCRIPT_NAME=/mybucket
    RADOS S3 Gateway: REQUEST_URI=/mybucket/ceph.tgz

I think it will be better to retrive user's request from REQUEST_URI.

So I took some advantage on some unused variable, and then made this
patch (maybe a workaround).

Please help to review this, hope this patch helps.

Happy Hacking!

-CC


---
 src/rgw/rgw_rest.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc
index b923c42..1669e6f 100644
--- a/src/rgw/rgw_rest.cc
+++ b/src/rgw/rgw_rest.cc
@@ -493,7 +493,7 @@ void init_entities_from_header(struct req_state *s)
     }
   } else s->host_bucket = NULL;

-  const char *req_name = s->path_name;
+  const char *req_name = s->path_name_url.c_str();
   const char *p;

   if (*req_name == '?') {
-- 
1.7.0.4

             reply	other threads:[~2011-02-17 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 11:20 cclien [this message]
2011-02-17 19:13 ` [PATCH] rgw: Lighttpd compatibity Yehuda Sadeh Weinraub
2011-02-17 19:36   ` cclien
2011-02-17 19:38 ` Tommi Virtanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikEd8UUyy3ncf2DiDqR1Aa0UNDy3AVVGnVSyCxK@mail.gmail.com \
    --to=cclien@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.