SkynetLabs / skynet-webportal

A webapp that makes Skynet accessible to web browsers.
https://siasky.net
Other
256 stars 55 forks source link

bad getawas when there is index.html and file number is > 500 in folder #503

Closed DaWe35 closed 3 years ago

DaWe35 commented 3 years ago

After I uploaded a folder that contained an index.html and 500+ other files, the main URL shows 502: https://siasky.net/fAFehEsNgGHH40lu026FYhWwhihJg0HeCbYopHlb3GAaWw/

kwypchlo commented 3 years ago

oof even curl cannot parse such a huge header, I will look into this

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9980 (#0)
> GET /skynet/skylink/fAFehEsNgGHH40lu026FYhWwhihJg0HeCbYopHlb3GAaWw/ HTTP/1.1
> Host: localhost:9980
> User-Agent: Sia-Agent
> Accept: */*
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Disposition: inline; filename="dist"
< Content-Length: 12894
< Content-Type: text/html
< Etag: "f4025ca36a0c8d4833185c89bf7ea869a2c3b6bc6b4fdda48bc4b9de16fd2b55"
* Avoided giant realloc for header (max is 102400)!
* Curl_http_done: called premature == 1
* stopped the pause stream!
* Closing connection 0
curl: (27) Avoided giant realloc for header (max is 102400)!
DaWe35 commented 3 years ago

Haha, I just found playing with SkyID. Anyway, it's not urgent for me, I reduced my file number easily. Finding the bug was harder 😂

kwypchlo commented 3 years ago

Due to headers limitations, directory uploads with large number of files need to be split up, otherwise applications might have issues consuming them. I am glad you were able to reduce the number of files 👍