By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,244 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,244 IT Pros & Developers. It's quick & easy.

Displaying GIF's

P: n/a
Hi !

I had writen my own HTTP server, which is very tiny (due our needs) and
works excelent. Currently, it accepts only HTML files. I would like to
include some media files too. I am working on GIF's right now, and have
no idea, why my client (Mozilla 1.6) is not showing them.Instead of
graphics, it is showed only blank box (strange, its size matches
original GIF size).
What I send to client is (I included visible EOL's)

Client:
GET /apache.gif HTTP/1.1\n
My server:
HTTP/1.0 200 OK\n
Date: Tue Feb 3 07:00:09 CET 2004\n
Server: MyHTTP/1.0.0\n
Accept-Ranges: bytes\n
Connection: close\n
Content-Length: 2326\n
Content-type: image/gif\n
\n
<raw image, exactly 2326 bytes>

Does someone know where is the trick ?
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Glodalec wrote:
Date: Tue Feb 3 07:00:09 CET 2004\n
I believe your Date string should have a comma after "Tue", although I
doubt that that is the problem.
Instead of graphics, it is showed only blank box (strange, its size
matches original GIF size).


Do other clients (wget, other browsers) download the image files alright?
Is it just Mozilla that has problems? What if you save the image files to
hard disk using wget and then open the saved copy locally through Mozilla?

A URL could be handy.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

Jul 20 '05 #2

P: n/a
In article <pa****************************@goddamn.co.uk>,
Us******************@deadspam.com says...
Glodalec wrote:
Date: Tue Feb 3 07:00:09 CET 2004\n


I believe your Date string should have a comma after "Tue", although I
doubt that that is the problem.
Instead of graphics, it is showed only blank box (strange, its size
matches original GIF size).


Do other clients (wget, other browsers) download the image files alright?
Is it just Mozilla that has problems? What if you save the image files to
hard disk using wget and then open the saved copy locally through Mozilla?

A URL could be handy.

It is actually the same GIF file. I had installed sniffer, and saw, that
using client<->apache only two packets arive, while client<->myserver
combination produces 4 packets (HTTP headers are sent within two
packets). I had tried buffered & non-buffered stream write, but always
have same result. I think, that client takes "Date" tag only as part of
info string, nothing to do with it (I checked that Cache does not have
any influens on that field).
Jul 20 '05 #3

P: n/a
In article <MP************************@news.siol.net>,
gl******@yahoo.com says...
Hi !

I had writen my own HTTP server, which is very tiny (due our needs) and
works excelent. Currently, it accepts only HTML files. I would like to
include some media files too. I am working on GIF's right now, and have
no idea, why my client (Mozilla 1.6) is not showing them.Instead of
graphics, it is showed only blank box (strange, its size matches
original GIF size).
What I send to client is (I included visible EOL's)

Client:
GET /apache.gif HTTP/1.1\n
My server:
HTTP/1.0 200 OK\n
Date: Tue Feb 3 07:00:09 CET 2004\n
Server: MyHTTP/1.0.0\n
Accept-Ranges: bytes\n
Connection: close\n
Content-Length: 2326\n
Content-type: image/gif\n
\n
<raw image, exactly 2326 bytes>

Does someone know where is the trick ?

I found an error within the mode of the opening GIF file handle. It
works now. Thx.
Jul 20 '05 #4

P: n/a
In article <MP************************@news.siol.net>,
Glodalec <gl******@yahoo.com> writes:
What I send to client is (I included visible EOL's)
Visible but incorrect.
Client:
GET /apache.gif HTTP/1.1\n
That's not HTTP/1.1.
My server:
HTTP/1.0 200 OK\n
and that's not HTTP/1.0.
Does someone know where is the trick ?


You could start by not posting to totally off-topic newsgroups.
Note followups.

--
Nick Kew
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.