Erik Brännlund wrote: > Hi! > > I'm trying to send a small JPEG- image over TWSocket directly. If I > send a HTML coded page it works but not for an image. > > This is what I send. > > l.Add('HTTP/1.1 200 OK' + #13#10); // l is TStringList; > l.Add('Content-Type: image/jpeg' + #13#10); > l.Add('Content-Length: ' + IntToStr(O.Size) + #13#10#13#10); > l.SaveToStream(O); //O is TMemoryStream; > J.SaveToStream(O);//J is a small JPEG (size is ~800 bytes) > Sock.Send(O.Memory, O,Size); > > What am I doing wrong?
Have a look at HTTPCLIEXAMPLE.ZIP available at the ICS website (User Made). "DaFlip created the example code for using HTTP Mutlipart Formdata posting with the HTTPCli component. It includes source for server side (CGI/Perl) and client side (Delphi 4)" -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html > > /Erik -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be