#Trying to get the contents of a local request with TcpStream

8 messages · Page 1 of 1 (latest)

tranquil marten
#

you should be reading in a loop

#

probably the header comes first and the content later

#

but you stop reading after the first time

#

read says it will read at least 1 byte

#

where 1 is completely acceptable

#

so you're not guaranteed to even get the header right now

tranquil marten
#

the for loop is fine

#

the reading part is the problem