InternalError on HEAD with a multipart-manifest=get&format=raw query param

Bug #2029174 reported by ASHWIN A NAIR
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
In Progress
Undecided
Unassigned

Bug Description

vagrant@vagrant:~/swift$ curl --location --head 'http://saio:8090/v1/AUTH_test/testheadpart/test.mp4?multipart-manifest=get&format=raw'
HTTP/1.1 500 Internal Error
Content-Type: text/plain
Content-Length: 17
X-Trans-Id: tx42940ff6186342ca9da6d-0064c84e91
X-Openstack-Request-Id: tx42940ff6186342ca9da6d-0064c84e91
Date: Tue, 01 Aug 2023 00:15:13 GMT

Related Swift logs from my dev vsaio environment:

vagrant proxy-server:

Error: An error occurred: #012Traceback (most recent call last):#012 File "/vagrant/swift/swift/common/middleware/catch_errors.py",
line 75, in handle_request#012 resp = self._app_call(env)#012 File "/vagrant/swift/swift/common/wsgi.py",
line 1116, in _app_call#012 resp = reiterate(resp)#012 File "/vagrant/swift/swift/common/utils/__init__.py",
line 3589, in reiterate#012 chunk = next(iterator)#012 File "/vagrant/swift/swift/common/middleware/proxy_logging.py",
line 439, in iter_response#012 for chunk in iterator:#012 File "/vagrant/swift/swift/common/middleware/catch_errors.py",

line 45, in enforce_byte_count#012 raise

BadResponseLength(#012swift.common.middleware.catch_errors.BadResponseLength: Too many bytes; truncating after 0 bytes with at least 2 surplus bytes remaining (txn: tx42940ff6186342ca9da6d-0064c84e91) (client_ip: 192.168.8.80)

description: updated
summary: - Internal Error 500 on HEAD with a multipart-manifest=get&format=raw
- query param
+ InternalError on HEAD with a multipart-manifest=get&format=raw query
+ param
Revision history for this message
clayg (clay-gerrard) wrote :

source of bug is here: https://github.com/NVIDIA/swift/blob/master/swift/common/middleware/slo.py#L945

original HEAD request for manifest returns no body, parse error makes up data and then tries to return it (which byteenforcer blows up; because HEAD resp shouldn't have body)

N.B. ideally clients might expect HEAD resp to have same headers as GET requests - but that may not be trivial for HEAD w/ ?format=raw unless we refetch

Changed in swift:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.