Audio/Video responses are missing the Accept-Ranges HTTP header, preventing users from scrubbing the progress bar during preview (no support for range requests). #13558

Closed
opened 2026-02-21 19:12:43 -05:00 by yindo · 1 comment
Owner

Originally created by @sondin on GitHub (Apr 29, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

main

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

‌Missing Header‌: The HTTP response for audio/video files does not include Accept-Ranges: bytes.
‌Impact‌:
Clients (e.g., browsers/media players) cannot request partial content (e.g., skipping to a specific timestamp).
Users cannot drag the progress bar to seek forward/backward during playback.
‌Required Fix‌: Ensure the server includes Accept-Ranges: bytes and supports Range requests

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @sondin on GitHub (Apr 29, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version main ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce **‌Missing Header‌**: The HTTP response for audio/video files does not include Accept-Ranges: bytes. **‌Impact‌:** Clients (e.g., browsers/media players) cannot request partial content (e.g., skipping to a specific timestamp). Users cannot drag the progress bar to seek forward/backward during playback. **‌Required Fix‌:** Ensure the server includes Accept-Ranges: bytes and supports Range requests ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the stt & tts label 2026-02-21 19:12:43 -05:00
yindo closed this issue 2026-02-21 19:12:43 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 29, 2025):

The issue you're encountering is related to the absence of the Accept-Ranges: bytes header in HTTP responses for audio/video files, which prevents clients from requesting partial content and affects the ability to seek during playback.

To address this, you need to ensure that the server includes the Accept-Ranges: bytes header in its responses and supports HTTP Range requests. Unfortunately, I couldn't find specific information in the Dify codebase regarding support for HTTP Range requests [1]. You might need to implement this functionality in the server-side code, possibly by modifying the Flask server configuration or middleware to handle range requests appropriately.

If you're using Flask, you can add support for range requests by implementing custom logic to handle the Range header in your response handling code. This typically involves parsing the Range header, serving the requested byte range, and setting the appropriate response headers (Content-Range, Accept-Ranges, etc.).

Consider reviewing Flask documentation or related resources for implementing range request handling, as this might require custom code to manage byte ranges and partial content delivery.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 29, 2025): <!-- Answer --> The issue you're encountering is related to the absence of the `Accept-Ranges: bytes` header in HTTP responses for audio/video files, which prevents clients from requesting partial content and affects the ability to seek during playback. To address this, you need to ensure that the server includes the `Accept-Ranges: bytes` header in its responses and supports HTTP Range requests. Unfortunately, I couldn't find specific information in the Dify codebase regarding support for HTTP Range requests <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/http_request/entities.py)</sup>. You might need to implement this functionality in the server-side code, possibly by modifying the Flask server configuration or middleware to handle range requests appropriately. If you're using Flask, you can add support for range requests by implementing custom logic to handle the `Range` header in your response handling code. This typically involves parsing the `Range` header, serving the requested byte range, and setting the appropriate response headers (`Content-Range`, `Accept-Ranges`, etc.). Consider reviewing Flask documentation or related resources for implementing range request handling, as this might require custom code to manage byte ranges and partial content delivery. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/f4a571d8-12f0-4f19-ac26-1ff45a49998b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f4a571d8-12f0-4f19-ac26-1ff45a49998b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f4a571d8-12f0-4f19-ac26-1ff45a49998b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f4a571d8-12f0-4f19-ac26-1ff45a49998b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f4a571d8-12f0-4f19-ac26-1ff45a49998b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/f4a571d8-12f0-4f19-ac26-1ff45a49998b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f4a571d8-12f0-4f19-ac26-1ff45a49998b?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13558