Public bug reported: The OVN metadata response should be built according to the response.
When "curl -I" is sent, the HTTP method used is "HEAD". The request returns the actual content length of the response with an empty body because the request only needs the headers. The new ``webob.Response`` built should contain the response body (empty) but the actual content length (zero). Currently [1] the crafted response is receiving all the returned headers. Instead of this, only 'content-type' header should be copied. The length will be calculated from the body size. [1]https://github.com/openstack/neutron/blob/a962fc636b7b3c410633a34aa0c6a146a60a8acd/neutron/agent/ovn/metadata/server_socket.py#L63 ** Affects: neutron Importance: Medium Assignee: Rodolfo Alonso (rodolfo-alonso-hernandez) Status: In Progress ** Changed in: neutron Importance: Undecided => Medium ** Changed in: neutron Assignee: (unassigned) => Rodolfo Alonso (rodolfo-alonso-hernandez) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/2097431 Title: [OVN] OVN metadata agent should build the response according to the content Status in neutron: In Progress Bug description: The OVN metadata response should be built according to the response. When "curl -I" is sent, the HTTP method used is "HEAD". The request returns the actual content length of the response with an empty body because the request only needs the headers. The new ``webob.Response`` built should contain the response body (empty) but the actual content length (zero). Currently [1] the crafted response is receiving all the returned headers. Instead of this, only 'content-type' header should be copied. The length will be calculated from the body size. [1]https://github.com/openstack/neutron/blob/a962fc636b7b3c410633a34aa0c6a146a60a8acd/neutron/agent/ovn/metadata/server_socket.py#L63 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/2097431/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp