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

Elek, Marton commented on HDDS-573:
-----------------------------------

+1 tested and worked well:

 
{code:java}

curl -v  -X HEAD  http://b1xxx.localhost:9878/ 
 
Warning: Setting custom HTTP method to HEAD with -X/--request may not work the
Warning: way you want. Consider using -I/--head instead.
*   Trying ::1...
* TCP_NODELAY set
* Connected to b1xxx.localhost (::1) port 9878 (#0)
> HEAD / HTTP/1.1
> Host: b1xxx.localhost:9878
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 29 Oct 2018 13:42:52 GMT
< Cache-Control: no-cache
< Expires: Mon, 29 Oct 2018 13:42:52 GMT
< Date: Mon, 29 Oct 2018 13:42:52 GMT
< Pragma: no-cache
< Content-Type: text/xml
< X-Content-Type-Options: nosniff
< X-FRAME-OPTIONS: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Server: Ozone
< x-amz-id-2: Kri68tFVQM4y15
< x-amz-request-id: 00e5fc67-9d30-4588-9947-89234d6e5a0d
< Content-Length: 0
<
* Connection #0 to host b1xxx.localhost left intact

curl -v -H 'Host:b1xxx.localhost'  -X HEAD  http://b1xxx.localhost:9878/
Warning: Setting custom HTTP method to HEAD with -X/--request may not work the
Warning: way you want. Consider using -I/--head instead.
*   Trying ::1...
* TCP_NODELAY set
* Connected to b1xxx.localhost (::1) port 9878 (#0)
> HEAD / HTTP/1.1
> Host:b1xxx.localhost
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 29 Oct 2018 13:42:58 GMT
< Cache-Control: no-cache
< Expires: Mon, 29 Oct 2018 13:42:58 GMT
< Date: Mon, 29 Oct 2018 13:42:58 GMT
< Pragma: no-cache
< Content-Type: text/xml
< X-Content-Type-Options: nosniff
< X-FRAME-OPTIONS: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Server: Ozone
< x-amz-id-2: doPC3pm8qmS3S
< x-amz-request-id: 97998e36-f7f2-4bcb-8e9c-266eacd3431b
< Content-Length: 0
<
* Connection #0 to host b1xxx.localhost left intact
{code}
Note: by default curl adds the port numbers but awscli + mitm doesn't

Will commit it soon...

> Make VirtualHostStyleFilter port agnostic
> -----------------------------------------
>
>                 Key: HDDS-573
>                 URL: https://issues.apache.org/jira/browse/HDDS-573
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Elek, Marton
>            Assignee: Danilo Perez
>            Priority: Major
>              Labels: newbie
>         Attachments: HDDS-573.00.patch, HDDS-573.01.patch
>
>
> Based on the discussion in HDDS-525
> The host HTTP header sometimes contains the port, sometimes not (with aws cli 
> we have the port, with mitm proxy we doesn't). Would be easier to remove it 
> anyway to make it easier to configure the s3 gateway.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to