Project

General

Profile

Bug #12353

rgw: fails to parse HTTP_HOST=<FQDN>:<PORT> header

Added by Valery Tschopp over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Using radosgw version 0.94.2 (5fb85614ca8f354284c713a2f9c610860720bbf3), behind an apache2 server (HTTPS terminator)

This works:

curl https://perf-tests.os.s2.scloud.switch.ch:443/data/10M.data

But this FAILS:

curl -H "Host: perf-tests.os.s2.scloud.switch.ch:443" https://perf-tests.os.s2.scloud.switch.ch:443/data/10M.data
<Error><Code>NoSuchBucket</Code></Error>

The log shows the HTTP_HOST header containing FQDN and the port, and just after the request is process it fails to parse the subdomain and domain (because of the port?):

From /var/log/ceph/ceph-radosgw.gateway.log
...
2015-07-16 14:19:11.710199 7f186b837700 20 HTTP_HOST=perf-tests.os.s2.scloud.switch.ch:443
2015-07-16 14:19:11.710435 7f186b837700 20 HTTP_USER_AGENT=Echoping/6.0.2
...
2015-07-16 14:19:11.713723 7f186b837700 1 ====== starting new request req=0x7f1c880fb140 =====
2015-07-16 14:19:11.713746 7f186b837700 2 req 6:0.000023::GET /data/10M.data::initializing
2015-07-16 14:19:11.713752 7f186b837700 10 host=perf-tests.os.s2.scloud.switch.ch:443
2015-07-16 14:19:11.713754 7f186b837700 20 subdomain= domain= in_hosted_domain=0
2015-07-16 14:19:11.713791 7f186b837700 10 s->object=10M.data s->bucket=data
2015-07-16 14:19:11.713798 7f186b837700 2 req 6:0.000075:s3:GET /data/10M.data::getting op
2015-07-16 14:19:11.713804 7f186b837700 2 req 6:0.000081:s3:GET /data/10M.data:get_obj:authorizing
2015-07-16 14:19:11.713809 7f186b837700 2 req 6:0.000086:s3:GET /data/10M.data:get_obj:reading permissions
2015-07-16 14:19:11.713838 7f186b837700 20 get_obj_state: rctx=0x7f186b8361c0 obj=.rgw:data state=0x7f1c581731f0 s->prefetch_data=0
2015-07-16 14:19:11.713847 7f186b837700 10 cache get: name=.rgw+data : type miss (requested=22, cached=0)
2015-07-16 14:19:11.716795 7f186b837700 10 cache put: name=.rgw+data
2015-07-16 14:19:11.716814 7f186b837700 10 moving .rgw+data to cache LRU end
2015-07-16 14:19:11.716841 7f186b837700 10 read_permissions on data(@[]):10M.data only_bucket=0 ret=-2002
2015-07-16 14:19:11.716905 7f186b837700 2 req 6:0.003181:s3:GET /data/10M.data:get_obj:http status=404
2015-07-16 14:19:11.716915 7f186b837700 1 ====== req done req=0x7f1c880fb140 http_status=404 ======


Related issues

Copied to rgw - Backport #13224: rgw: fails to parse HTTP_HOST=<FQDN>:<PORT> header Resolved 07/16/2015

History

#1 Updated by Simon Leinen over 8 years ago

The master branch seems to include a fix for this issue:

https://github.com/ceph/ceph/commit/abe4ec293d08b0314bf5c081ace2456073f3a22c

Could you backport this to hammer, please?

#2 Updated by Robin Johnson over 8 years ago

  • Priority changed from Normal to High

#3 Updated by Loïc Dachary over 8 years ago

  • Status changed from New to Pending Backport
  • Backport set to hammer

#4 Updated by Loïc Dachary over 8 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF