geoffleach has asked for the wisdom of the Perl Monks concerning the following question:

IO::All $foo = io($url);
In the case that the content at $url is split up by the server. For example fetching the same URL with wget, I see the response:
206 Partial Content
My question: is there any way to persuade IO::All to process the partial content?

Thanks

Replies are listed 'Best First'.
Re: IO::All fails on 203 response
by kennethk (Abbot) on Feb 04, 2016 at 16:19 UTC
    Is it a 203 or a 206? 203 means you actually got all the information, it was just handed off to a third party. 206 means you only requested a chunk of the file; this is common in video buffering, for example. Getting more of the file is a matter of modifying your URL, and is not related to IO::All.

    List_of_HTTP_status_codes. All 200 codes are successful.


    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

      Hmmm .... I guess it all means what the meaning of "successful" is. But now I know what I need to do. Thanks.

      "203" was a fumble-finger on my part.

      Thanks.

        If your video player is buffering the content between 1:30 and 1:35, it will issue a request for that chunk of the file. It will get a 206 in response. The request is successful because you got what you asked for.

        That said, I wouldn't be surprised if I sat on the wire for a video player and saw a stream of 200's instead of 206's. There are plenty of times people do not bother to exercise the entire HTTP spec.


        #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Re: IO::All fails on 203 response
by perlfan (Parson) on Feb 15, 2016 at 20:32 UTC
    I worked on IO::All last year as part of the PRC 2015, and all I can say is that it is an absolute mess and I would not use it.