> line=POST / HTTP/1.1
> line=Content-Length: 23
No you would see:
line=POST / HTTP/1.1
line=Content-Length: 23
line=0
if a null was returned.
But a null is never returned. Still your
loop ends as instead an exception is trown.
You did not see that because the catch does nothing.
Add a Log.i there and you will see.
You modified the original code which checked for an empty line.
Take the original code again.
Add a check for the Content-Lengh: line and decode the contentlength.
(in your example 23)
Then outside the loop do something like:
[code]
if ( contentlength > 0 ){
char [] buffer = new char[contentlength];
int nread = in.read (buffer, 0, contentlength);
String Parameters = new String( buffer);
// well you should check nread == contentlength
}
[/code]
> I am wondering where the HTTP POST data is?
That just follows the empty line. But as that data is not ended with
a newline in.readLine() cannot be used.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en