Bug #12917
closedRGW does not support absolute URI
0%
Description
When using goamz as the sdk to access rgw, it will fail. It is because that goamz send absoluteURI to RGW, It is similar to this issue. For rgw, there are different failure reasons between civetweb and Apache as the frontend. They are described as below:
For civetweb:
civetweb does not support the resolving of absoluteURI, so it will fail very quickly with a "400 bad request error". I have made a issue here to civetweb.
For Apache:
Apache will transfer the absoluteURI to rgw, but when doing the authorization, rgw will use the absoluteURI as the input for calculating the signature, so it wont match the signature get from client's request(which is calculated depended on general URI). So it will fail while doing authorization.
With apache as the frontend, I have hacked the source code of rgw, which adjust the req_info::request_uri to abs_path. So the following reference to the req_info::request_uri will get the right value, so as the input for calculating the signature of server side. It works well!
As far as I know, many languages's S3 sdk calculate the client side's signature using abs_path(I have tried Python, Java, Perl, Go). So in my opinion, adjusting the req_info::request_uri to fix this issue is a right way, but I am not sure if it will influence any other part.
If you have any point please feel free to let me know.
Thanks