Xuanwo commented on issue #5689: URL: https://github.com/apache/opendal/issues/5689#issuecomment-2696421750
Hi @aoli-al, thanks so much for your bug report! I really enjoyed reading through https://aoli.al/blogs/chrome-bug/. OpenDAL checks the body size against the `Content-Length`, and I thought `206 Partial Content` should return the correct `Content-Length`. It simply includes a `Content-Range` header specifying the range of the returned content. I tested it locally and find that the server does return correct `content-length`: ```http :) curl 'http://localhost:3000/gridwatch_2023-01-08.parquet' -H 'Range: bytes=4-138724' -v * Host localhost:3000 was resolved. * IPv6: ::1 * IPv4: 127.0.0.1 * Trying [::1]:3000... * Connected to localhost (::1) port 3000 * using HTTP/1.x > GET /gridwatch_2023-01-08.parquet HTTP/1.1 > Host: localhost:3000 > Accept: */* > Accept-Language: en-US,en;q=0.9 > Connection: keep-alive > DNT: 1 > Origin: https://xuanwo.io > Range: bytes=4-138724 > Sec-Fetch-Dest: empty > Sec-Fetch-Mode: cors > Sec-Fetch-Site: cross-site > User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0 > sec-ch-ua: "Not(A:Brand";v="99", "Microsoft Edge";v="133", "Chromium";v="133" > sec-ch-ua-mobile: ?0 > sec-ch-ua-platform: "Linux" > * Request completely sent off < HTTP/1.1 206 Partial Content < Access-Control-Allow-Origin: * < Access-Control-Allow-Headers: * < Access-Control-Allow-Credentials: true < Access-Control-Allow-Private-Network: true < Content-Length: 138721 < Content-Disposition: inline; filename="gridwatch_2023-01-08.parquet" < Accept-Ranges: bytes < ETag: "9fd6c7db3d0a71c6bfedd73034904a4ff3c0d3dc" < Content-Type: binary/octet-stream < Last-Modified: Wed, 10 Jan 2025 12:00:00 GMT < access-control-allow-methods: GET,HEAD < Vary: Origin, Access-Control-Request-Headers, Access-Control-Request-Method < Content-Range: bytes 4-138724/29300729 < Date: Tue, 04 Mar 2025 07:00:58 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Warning: Binary output can mess up your terminal. Use "--output -" to tell curl to Warning: output it to your terminal anyway, or consider "--output <FILE>" to save to a Warning: file. * client returned ERROR on write of 16384 bytes * closing connection #0 ``` Maybe I still haven't fully understood the problem. Does chrome provide less data than the declared `Content-Length`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
