Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#4648 closed patch (fixed)

Upnp does not handle requests that specify an invalid bytes range.

Reported by: anonymous Owned by: dblain
Priority: minor Milestone: 0.21
Component: upnp Version: head
Severity: medium Keywords: upnp invalid bytes range
Cc: Ticket locked: no

Description

I am using my PS3 to watch mythtv using the media server. For TV recordings only the PS3 requests a data range that is beyond the end of the file when you first press play. e.g. file is 500,000,000 bytes and PS3 requests the range 750,000,000-755,000,000. I'm not sure of the cause of this, possibly it is the fault of my ffmpeg transcoding job.

This causes an infinite loop in the sendfile64 region of HTTPRequest::SendResponseFile? consuming all cpu. The recording still starts but you have to wait for about 30 secs and the cpu spike still persists even then.

I have created a patch to send http response status 416 - "Requested Range not satisfiable" in this situation. It makes the recording start straight away and there is no cpu spike.

Attachments (1)

myth_handle_invalid_bytes_range_upnp.patch (2.0 KB) - added by anonymous 11 years ago.
Patch to fix upnp invalid bytes range request.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by anonymous

Patch to fix upnp invalid bytes range request.

comment:1 Changed 11 years ago by stuartm

Milestone: unknown0.21

comment:2 Changed 11 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [16359]) Patch from anon to handle invalid range requests from upnp clients.

Closes #4648.

comment:3 Changed 11 years ago by Isaac Richards

(In [16367]) Merge r16359 from trunk:

Patch from anon to handle invalid range requests from upnp clients. Closes #4648.

Note: See TracTickets for help on using tickets.