DEBUG [main] org.apache.http.wire - >> "POST /post.html HTTP/1.1[EOL]"
DEBUG [main] org.apache.http.wire - >> "Content-Length: 0[EOL]"
DEBUG [main] org.apache.http.wire - >> "Host: www.zdila.sk[EOL]"
DEBUG [main] org.apache.http.wire - >> "Connection: Keep-Alive[EOL]"
DEBUG [main] org.apache.http.wire - >> "[EOL]"

This first request is without entity body (0 length). Weird, but legal.

DEBUG [main] org.apache.http.wire - >> "POST /post.html HTTP/1.1[EOL]"
DEBUG [main] org.apache.http.wire - >> "Content-Length: 13[EOL]"
DEBUG [main] org.apache.http.wire - >> "Host: www.zdila.sk[EOL]"
DEBUG [main] org.apache.http.wire - >> "Connection: Keep-Alive[EOL]"
DEBUG [main] org.apache.http.wire - >> "[EOL]"


This POST request specifies 13 bytes content length but does not seem to send the entity body. Why, I don't now.


Now the code that produces that is:

postMethod.setEntity(new InputStreamEntity(new ByteArrayInputStream("submit=submit".getBytes()), 13));

Why are you using an InputStreamEntity and not a StringEntity? This code is dependent on your default platform encoding, thus not portable. The size may not be correct. In any case the content type of the request will be wrong.

Cheers

Ortwin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to