Reply To: HTTP Protocol help needed

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf HTTP Protocol help needed Reply To: HTTP Protocol help needed

#57187
Dennis Pfeifer
Participant

I don’t have a solution for you .. but ..

something that I find useful in diagnosing this type of problem is to use

hcitcptest

set up a listener, ..

and connect to it from your web browser ..

I can usually create a web page that does ‘exactly’ what I want.

I then review the data sent to hcitcptest…

I modify the engine code .. and evaluate it with a connection to

hcitcptest .. and make modifications until I’m comfortable with the results ..

and then .. I connect to the ‘real’ web server ..

here’s a simple test ..


[hci@swlx226]$ hcitcptest -t raw -p 7000

Listening for connection on port 7000….


from a browser on my PC ..

http:///swlx26.swmed.edu:7000/


on my unix box .. I see ..


Connection from cis-gx280-dpfeif.ircis.swmed.org at port 1842

Data recieved from the host will be printed to standard

output in a hex dump format. (Including any encoding chars,

data is dumped exactly as read.)

If you wish to *send* data, just type it in and press

return

Type C to quit

Got 389 bytes of data from host:

0x00000000 (00000)   47455420 2f204854 54502f31 2e310d0a   GET / HTTP/1.1..

0x00000010 (00016)   41636365 70743a20 696d6167 652f6769   Accept: image/gi

0x00000020 (00032)   662c2069 6d616765 2f782d78 6269746d   f, image/x-xbitm

0x00000030 (00048)   61702c20 696d6167 652f6a70 65672c20   ap, image/jpeg,

0x00000040 (00064)   696d6167 652f706a 7065672c 20617070   image/pjpeg, app

0x00000050 (00080)   6c696361 74696f6e 2f782d73 686f636b   lication/x-shock

0x00000060 (00096)   77617665 2d666c61 73682c20 6170706c   wave-flash, appl

0x00000070 (00112)   69636174 696f6e2f 766e642e 6d732d65   ication/vnd.ms-e

0x00000080 (00128)   7863656c 2c206170 706c6963 6174696f   xcel, applicatio

0x00000090 (00144)   6e2f766e 642e6d73 2d706f77 6572706f   n/vnd.ms-powerpo

0x000000a0 (00160)   696e742c 20617070 6c696361 74696f6e   int, application

0x000000b0 (00176)   2f6d7377 6f72642c 202a2f2a 0d0a4163   /msword, */*..Ac

0x000000c0 (00192)   63657074 2d4c616e 67756167 653a2065   cept-Language: e

0x000000d0 (00208)   6e2d7573 0d0a4163 63657074 2d456e63   n-us..Accept-Enc

0x000000e0 (00224)   6f64696e 673a2067 7a69702c 20646566   oding: gzip, def

0x000000f0 (00240)   6c617465 0d0a5573 65722d41 67656e74   late..User-Agent

0x00000100 (00256)   3a204d6f 7a696c6c 612f342e 30202863   : Mozilla/4.0 (c

0x00000110 (00272)   6f6d7061 7469626c 653b204d 53494520   ompatible; MSIE

0x00000120 (00288)   362e303b 2057696e 646f7773 204e5420   6.0; Windows NT

0x00000130 (00304)   352e313b 20535631 3b202e4e 45542043   5.1; SV1; .NET C

0x00000140 (00320)   4c522031 2e312e34 33323229 0d0a486f   LR 1.1.4322)..Ho

0x00000150 (00336)   73743a20 73776c78 32362e73 776d6564   st: swlx26.swmed

0x00000160 (00352)   2e656475 3a373030 300d0a43 6f6e6e65   .edu:7000..Conne

0x00000170 (00368)   6374696f 6e3a204b 6565702d 416c6976   ction: Keep-Aliv

0x00000180 (00384)   650d0a0d 0a                           e….


Can do the same with a post or get ..

Dennis

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10