Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo



  • Ted

    greetings, I am desparately trying to get my web-app to properly read a variable length stream of binary data returned from a URLStream POST/SUBMIT.

    What is happening is that although the web server is returning the complete data to the client after the "SUBMIT" (I check to make sure with Ethereal/tcpdump), the application occassionally isn't able to read all the data from the input buffer stream. I got a little more success when I loop one char at a time (e.g., read(buf_ptr, 1); buf_ptr++;  ) as opposed to trying to grab a larger part of the stream-in buf all at once (e.g., read(buf_ptr, 10000); buf_ptr+=10000)).

    One difference I did notice between what is sent out from the browser applet and my application was the "connection: keep-alive" construct in the HTTP header; I see there is no means to change "connection: close" to this setting in URLStream (other than hacking the change in the source code).
    Other than that, I'm at a loss of why the binary stream of data occassionally gets lost.

    I thought it might be dropping after hitting an eof char code but that was not the case either. :-?

    Any recommendations on a better read mechanism to catch all the binary data would be greatly appreciated!

    -- FWIW, I'm building the app within a MINGW and Debian environments.

    thanks very much in advance,