After loading the object with -H 'X-Attribute-File Path: common/prefix/', it is not possible to download the archive. #85

Closed
opened 2025-12-28 17:36:05 +00:00 by sami · 1 comment
Owner

Originally created by @acheyda on GitHub (Oct 31, 2022).

Originally assigned to: @KirillovDenis on GitHub.

After loading the object with -H 'X-Attribute-File Path: common/prefix/', it is not possible to download the archive.

Expected Behavior

Allow to download a zip archive

Current Behavior

wget http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre -O obj.zip
Connecting to 172.26.162.160:8888... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘obj.zip’

obj.zip [ <=> ] 0 --.-KB/s in 0s

(0.00 B/s) - ‘obj.zip’ saved [0]

1.Create a container:

neofs-cli --rpc-endpoint 172.26.162.160:8080 --wallet configuration/wallets/wallet.json container create --name avccont --policy "REP 2 IN X CBF 1 SELECT 2 FROM * AS X" --basic-acl public-read-write   --await
Enter password >
container ID: 9QDZNMKUT1RtDDKozqrZqgN1yAKLMhCADhut9ssdhdPp
awaiting...
Dcontainer has been persisted on sidechain

2.Upload an object with X-Attribute-FilePath=comm/pre/warandpeace.pdf:

curl -F 'file=@warandpeace.pdf;filename=warandpeace.pdf' -H 'X-Attribute-FilePath: comm/pre/warandpeace.pdf' http://172.26.162.160:8888/upload/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs
{
        "object_id": "65dKN9gKmvCDriiCqxxZkaceHpfNq1MLHfCtzDFFhyCt",
        "container_id": "2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs"
}

3.Download zip (positive):

wget http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre -O obj.zip
--2022-10-27 16:33:30--  http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre
Connecting to 172.26.162.160:8888... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘obj.zip’

obj.zip                                                 [  <=>                                                                                                             ]  29.79M  83.9MB/s    in 0.4s

2022-10-27 16:33:31 (83.9 MB/s) - ‘obj.zip’ saved [31238128]

4.Upload an object with X-Attribute-File path=Common/prefix/ :

curl -F 'file=@warandpeace.pdf;filename=warandpeace.pdf' -H 'X-Attribute-FilePath: common/prefix/' http://172.26.162.160:8888/upload/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs      {
        "object_id": "7m88Jdh7DXA5gDXHbaV2yWrxLzyeHi29KtoadP6gwv7N",
        "container_id": "2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs"
}

5.zip archive not download:

wget http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre -O obj.zip
--2022-10-27 16:34:55--  http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre
Connecting to 172.26.162.160:8888... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘obj.zip’


obj.zip                                                 [ <=>                                                                                                              ]       0  --.-KB/s    in 0s

2022-10-27 16:34:55 (0.00 B/s) - ‘obj.zip’ saved [0]

Your Environment

NeoFS HTTP Gateway
Version: v0.24.0-17-g1b172e58
GoVersion: go1.18.4
log.txt

Originally created by @acheyda on GitHub (Oct 31, 2022). Originally assigned to: @KirillovDenis on GitHub. After loading the object with -H 'X-Attribute-File Path: common/prefix/', it is not possible to download the archive. ## Expected Behavior Allow to download a zip archive ## Current Behavior wget http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre -O obj.zip Connecting to 172.26.162.160:8888... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/zip] Saving to: ‘obj.zip’ obj.zip [ <=> ] 0 --.-KB/s in 0s (0.00 B/s) - ‘obj.zip’ saved [0] 1.Create a container: ``` neofs-cli --rpc-endpoint 172.26.162.160:8080 --wallet configuration/wallets/wallet.json container create --name avccont --policy "REP 2 IN X CBF 1 SELECT 2 FROM * AS X" --basic-acl public-read-write --await Enter password > container ID: 9QDZNMKUT1RtDDKozqrZqgN1yAKLMhCADhut9ssdhdPp awaiting... Dcontainer has been persisted on sidechain ``` 2.Upload an object with X-Attribute-FilePath=comm/pre/warandpeace.pdf: ``` curl -F 'file=@warandpeace.pdf;filename=warandpeace.pdf' -H 'X-Attribute-FilePath: comm/pre/warandpeace.pdf' http://172.26.162.160:8888/upload/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs { "object_id": "65dKN9gKmvCDriiCqxxZkaceHpfNq1MLHfCtzDFFhyCt", "container_id": "2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs" } ``` 3.Download zip (positive): ``` wget http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre -O obj.zip --2022-10-27 16:33:30-- http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre Connecting to 172.26.162.160:8888... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/zip] Saving to: ‘obj.zip’ obj.zip [ <=> ] 29.79M 83.9MB/s in 0.4s 2022-10-27 16:33:31 (83.9 MB/s) - ‘obj.zip’ saved [31238128] ``` 4.Upload an object with X-Attribute-File path=Common/prefix/ : ``` curl -F 'file=@warandpeace.pdf;filename=warandpeace.pdf' -H 'X-Attribute-FilePath: common/prefix/' http://172.26.162.160:8888/upload/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs { "object_id": "7m88Jdh7DXA5gDXHbaV2yWrxLzyeHi29KtoadP6gwv7N", "container_id": "2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs" } ``` 5.zip archive not download: ``` wget http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre -O obj.zip --2022-10-27 16:34:55-- http://172.26.162.160:8888/zip/2R6JYNm6wBgXs1N28aNeTsVsy2E8joSuXenH72iqQbSs/comm/pre Connecting to 172.26.162.160:8888... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/zip] Saving to: ‘obj.zip’ obj.zip [ <=> ] 0 --.-KB/s in 0s 2022-10-27 16:34:55 (0.00 B/s) - ‘obj.zip’ saved [0] ``` ## Your Environment NeoFS HTTP Gateway Version: v0.24.0-17-g1b172e58 GoVersion: go1.18.4 [log.txt](https://github.com/nspcc-dev/neofs-http-gw/files/9898372/log.txt)
sami 2025-12-28 17:36:05 +00:00
  • closed this issue
  • added the
    bug
    U3
    labels
Author
Owner

@alexvanin commented on GitHub (Nov 8, 2022):

Closed in #226

@alexvanin commented on GitHub (Nov 8, 2022): Closed in #226
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-http-gw#85
No description provided.