|
-
Jul 29th, 2006, 11:38 AM
#1
Thread Starter
New Member
Urgent - My webserver sends html fine but not binary!?
I have a multi-threaded webserver core written in VB.NET. I have gotten it to parse headers, send HTML Documents, etc...
But whenever i send images they show as an X or corrupted...i was thinking i wasnt sending or reading in the right mode...but i read in binary to a byte array and i send as a byte array so im very confused...
You can view my current source code here:
http://prdownloads.sourceforge.net/c...d.rar?download
it would greatly appreciate help, so i can finish porting my webserver to .net and further advance the possibilities.
If you can help, please reply asap!
Reply With Quote
-
Jul 29th, 2006, 11:42 AM
#2
Re: Urgent - My webserver sends html fine but not binary!?
Have you sent the correct headers with the image.
-
Jul 29th, 2006, 12:43 PM
#3
Thread Starter
New Member
Re: Urgent - My webserver sends html fine but not binary!?
yup how does this look for a image header:
HTTP/1.0 200 OK
Server: Caedo HTTPd
Date: 29/07/2006 1:38:32 PM
Last-Modified: 29/07/2006 1:38:32 PM
Accept-Ranges: bytes
Content-Length: 1207
Connection: keep-alive
Content-Type: Image/bmp
thats the header i send on a request for a very small image called Games0.bmp
....any one have any ideas...?
-
Jul 29th, 2006, 01:44 PM
#4
Thread Starter
New Member
Re: Urgent - My webserver sends html fine but not binary!?
sorry for the post i have resolved this issue myself.
i simply had a small bg in my file sending routeine, and headers needed an extra line.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|