EOF-file missing

Discussion in 'Python' started by Tor Erik Sønvisen, Apr 14, 2005.

  1. Hi

    From a client I read a file into a string using read().
    On the server-side (it's a HTTPServer) i access the same string through the
    input stream rfile.
    However all useful read-methods (readlines, readline, read) expect an EOF
    before terminating.
    And for some reason the stream doesn't have the seek method either, so it's
    impossible to set the file-pointer to the end of the stream.
    how can I access the whole string then?
    Is it possible to add an EOF to the string before sending it from the
    client? Or maybe there are other solutions?

    regards
     
    Tor Erik Sønvisen, Apr 14, 2005
    #1
    1. Advertising

  2. Tor Erik Sønvisen

    infidel Guest

    You can use the Content-Length header to tell the server how long the
    string is.
     
    infidel, Apr 14, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sacha Korell
    Replies:
    2
    Views:
    15,055
    Mattias Sjögren
    Sep 6, 2003
  2. Kobu
    Replies:
    10
    Views:
    657
    Keith Thompson
    Mar 4, 2005
  3. AB@
    Replies:
    2
    Views:
    1,423
  4. SpreadTooThin

    ifstream eof not reporting eof?

    SpreadTooThin, Jun 13, 2007, in forum: C++
    Replies:
    10
    Views:
    712
    James Kanze
    Jun 15, 2007
  5. Jan Burse
    Replies:
    67
    Views:
    1,104
    Jan Burse
    Mar 14, 2012
Loading...

Share This Page