Results 1 to 4 of 4

Thread: Urgent - My webserver sends html fine but not binary!?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    3

    Angry 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

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Urgent - My webserver sends html fine but not binary!?

    Have you sent the correct headers with the image.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    3

    Angry 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...?

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    3

    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
  •  



Click Here to Expand Forum to Full Width