all,
my requirement simple. have perform simple http post ip:port combination. used simple socket programming , have been successful in sending across request them , response them. problem being response http 400: bad request followed http post message. not sure if problem client or server. guess being there might problem data sending. post looks like
post /<server tag> http/5.1 content-length: xxx --content-- and response server looks this
http/1.1 400 bad request content-length: xxx --same content sent them-- i not sure if put in ip of server here kept myself using . pretty sure problem not there since response server , confident connection. can me ?
ps: pointers post:
1) http 5.1 requested server , not sure if correct
2) have played around number of line spaces after content length. have tried giving 1 , 2 lines. not sure if make difference. on wireshark though see difference number of line spaces single line space protocol specified tcp 2 changes http. response received on http protocol. explanation on difference help
thanks
edit: other thing confuses me response has http 1.1 , not 5.1 had sent. have tried changing post 1.1 no success
edit2: based on suggestion form fvu , others, used webclient upload request. still got 400. header generated webclient looks this
post <server tag> http/1.1 host: <ip:port> content-length: 484 expect: 100-continue connection: keep-alive the issue see might server not expecting details in header. server has requested content-length us. problem? thanks
you can use debugging proxy view client request , server response figure out client socket program needs do.
but first need create simple web page browser displays, allows post browser web server, , simple response server.
Comments
Post a Comment