[ 
https://issues.apache.org/jira/browse/KNOX-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16967595#comment-16967595
 ] 

ASF subversion and git services commented on KNOX-1005:
-------------------------------------------------------

Commit d9a3eb9307e91ef1b40d72fed9f22511fe4b1646 in knox's branch 
refs/heads/master from Kevin Risden
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=d9a3eb9 ]

KNOX-1842 - Upgrade httpclient to 4.5.10 (#176)

HttpClient 4.5.7 broke url normalization. Knox
didn't have any tests for this case and so we
had to revert after the fact. HttpClient 4.5.8
fixed a lot of the url normalization and some
libraries decided to turn url normalization off.

This commit does the following:
* Adds a test for %2F - KNOX-1005
    * This test passes under HttpClient 4.5.6 and 4.5.8+
    * It breaks as expected under HttpClient 4.5.7
* Adds an explicit config enabling url normalization
    * Ensures that we are in control of url normalization
    * Adds a test for this configuration as well
* Test with both HttpClient normalization enabled and disabled
    * `rest-assured` doesn't expose `RequestConfig` to disable
url normalization
    * Shows how to use HttpClient in `GatewayBasicFuncTest`

All the url safe characters like %2F are fixed by HTTPCLIENT-1968.

The case of `/abc///def` is normalized to `/abc/def` the same
way that Knox does internally with `getPathInfo` and Java URI.

Signed-off-by: Kevin Risden <[email protected]>

> Special characters in HBase rows while called through Knox
> ----------------------------------------------------------
>
>                 Key: KNOX-1005
>                 URL: https://issues.apache.org/jira/browse/KNOX-1005
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.12.0, 0.13.0
>         Environment: CentOS Linux release 7.3.1611, HBase 1.1.2
>            Reporter: Roman
>            Assignee: Sandeep More
>            Priority: Major
>              Labels: regresion
>             Fix For: 0.14.0
>
>         Attachments: KNOX-1029.001.patch
>
>
> Hello,
> Any HBase row containing special characters in the name (for example #) 
> throws 404 Not Found error if accessed via Knox 0.9.0 and above. Accessing 
> the same row directly via HBase Rest works without any issues.
> I haven't tried with other special characters though, and I think this is 
> caused by KNOX-709.
> How to reproduce:
> - Create an entry in HBase containing #:
> {code:java}
> hbase(main):002:0> put 'hbaseexample', '5#', 'columns:_c1', 'test'
> hbase(main):002:0> scan 'hbaseexample'
> ROW        COLUMN+CELL 
>  5#            column=columns:_c1, timestamp=1503660672170, value=test
> 1 row(s) in 0.6700 seconds{code}
> - Try to access it via Knox 0.9.0 and above:
> {code:java}
> # curl -iku user:pass -X GET 
> 'https://srv-knx01:8443/gateway/default/hbase/hbaseexample/5%23'
> HTTP/1.1 404 Not Found
> Date: Fri, 25 Aug 2017 14:48:08 GMT
> Set-Cookie: JSESSIONID=92exxxxxxxxxx16uy;Path=/gateway/default;Secure;HttpOnly
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Set-Cookie: rememberMe=deleteMe; Path=/gateway/default; Max-Age=0; 
> Expires=Thu, 24-Aug-2017 14:48:08 GMT
> Content-Type: text/plain
> Content-Length: 11
> Server: Jetty(9.2.15.v20160210)
> Not found
> {code}
> - No issues with Knox 0.8.0 and below:
> {code:java}
> # curl -iku user:pass -X GET 
> 'https://srv-knx01:8443/gateway/default/hbase/hbaseexample/5%23'
> HTTP/1.1 200 OK
> Set-Cookie: JSESSIONID=1kxxxxxxxxxxnl5q;Path=/gateway/default;Secure;HttpOnly
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Content-Type: text/xml
> Transfer-Encoding: chunked
> Server: Jetty(8.1.14.v20131031)
> <?xml version="1.0" standalone="yes"?><CellSet><Row key="NSM="><Cell 
> column="Y29sdW1uczpfYzE=" 
> timestamp="1503660672170">dGVzdA==</Cell></Row></CellSet>
> {code}
> Thank you in advance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to