From mschaff at bu.edu  Sun Jul 23 23:15:09 2006
From: mschaff at bu.edu (mschaff at bu.edu)
Date: Sun, 23 Jul 2006 17:15:09 -0400
Subject: [Rd] Problems Reading from Socket
In-Reply-To: <017A38B8-7167-4CCA-98DA-4411ADCB1396@bu.edu>
References: <017A38B8-7167-4CCA-98DA-4411ADCB1396@bu.edu>
Message-ID: <20060723171509.icqpilye8qo48sks@www.bu.edu>

To answer my own question (and maybe help someone else), it turns out 
my web server was sending chunked responses and inserting chunk sizes 
before each data chunk.

Changing the line:

request<-paste("POST ",path," HTTP/1.1\nHost: ",host...

to

request<-paste("POST ",path," HTTP/1.0\nHost: ",host...

disables chunked reponses and allows R to read directly from the socket 
without additional parsing.  So this wasn't really an R problem, but I 
thought this detail might help someone else.

--
Mike



[Rd] Problems Reading from Socket
mschaff at bu.edu