Thanks for pointing it out. I think I used a wrong names to refer to "simple" request (without protocol version part) as 1.0 as opposed to 1.1.
For "simple" request, the response does not carry a header. On the particular URL http://minutewar.gpsgames.org:80/Game032/board.htm HTTP/1.0 as given below also works. But the "simple" request will not work. --- bill lam <[EMAIL PROTECTED]> wrote: > Oleg Kobchenko wrote: > > This only works for a particular server, > > because they do not use > > Transfer-Encoding: chunked > > > > Most other HTTP/1.1 servers do. It requires > > complex stream handling to process "chunked" > > correctly: parsing header, which is readline; > > syncing TCP packets and chunks, etc. > > > > Is it really necessary to use HTTP/1.1? I usually use HTTP/1.0 (to avoid > chunked) and supply header to imitate a browser request. > eg. > req10=: 3 : 0 > 'host port path'=. y > t=. 'GET ',path,' HTTP/1.0',CRLF > t=. t,'Accept: */*',CRLF > t=. t,'Accept-Language: en-us',CRLF > t=. t,'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; > SV1)',CRLF > t=. t,'Host: ',host,CRLF > t=. t,'Connection: Keep-Alive',CRLF > t=. t,CRLF > t > ) > > Sometimes server check referer to stop hot-link, so that it need to add > t=. t,'Referer: ',referer,CRLF > > where referer is the webpage contain the link to the requested resource. > > > -- > regards, > bill > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
