[HELP] A weird issue when downloading files

Julien Blanchard julien at typed-hole.org
Wed Oct 2 09:12:25 BST 2019
On 10/2/19 12:04 AM, Sean Conner wrote:
>    I'm not understanding what you are doing here.
I wanted to remove the header part in the most convoluted way possible :D
>    Here's how I would do this---read bytes until you have seen the CRLF [1].
> That's the response from the server.  I then would parse that line of data
> to get the response and MIME type.  Then all I need to do is continue
> reading data from the server and write that data toa file.  Then launch the
> external program.

OMG you're so right! I was trying to put a square peg in a round hole 
since I already
had the content splitted has two strings (header/body) when I should 
have re-thought
my parsing strategy the way you're describing directly at the bytes level.

>    Not really.  And whatever you are doing it seems overly complicated ... oh
> wait ... you aren't using Python 3 by any chance, are you?
>
>    -spc (just a stab in the dark ... )
>
> [1]	ASCII character 13 and ASCII character 10
I'm using Rust but I'm curious what the issue could be with python 3?

Anyway thanks a lot Sean! It helped a lot!



Archive home | About this archive