BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: {bb} http read of MS IIS server confuses BB
Might I suggest truncating if a <body> tag is found? Not everyone puts
Content-type:
declarations on their pages (I do, but many don't). If you look for the
<body> tag
you know that the server returned a "GET" request style reply (instead of
the "HEAD"
style reply it was supposed to return). Either way, you know the web server
is up.
fpsm
Henrik Olsen said:
> It would seem like the server is reacting as if BB did a
> GET request instead of the HEAD request normally used.
I agree. The Perl used to generate the page seems
to be both substandard and non-standard.
Rather than start an argument with web-heads over
whose code is 'broken', I would prefer to make
BB a tad more bullet-proof so that it can monitor
even brain-damaged examples like the one I
encountered.
I guess my question should be rephrased as:
Does anyone see potential problems with a
modification to BB that truncates after a
number of bytes more reasonable for a
response to a head request, or perhaps
truncate when it sees "Content-Type:" or
other indicator of a website that is
responding, regardless of the type of
response?
After all, the goal is to see if the
web server is running, not to see if the
web pages themselves are perfect.
Obviously, I will check the code into the repository
for consideration as a part of the next release, but
I assume that I will not be the only one to encounter
non-compliant responses from web sites.
It looks to me like the modifications to bbnet.c
would go in here:
if (http) {
if (dir) sprintf(line, "HEAD %s...
else sprintf(line, "HEAD / HTTP...
I would suggest that a simple test for the string
"Content-Type:", or some other common string found
in any minimally-functional web-server response
would be a more bullet-proof test. Truncating
the response after that line would also help to
eliminate the potential for the "web-page within
web-page" scenario I encountered with BB's
"[whatever].http.html" pages.
Please comment. I am but a simple network gonk,
not worthy to make random proposals or suggest
narrow-focus changes to BB without a sanity check
from someone who can claim to be sane.
james fischer jfischer@supercollider.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please send mail for the mailing list to: bb@taex001.tamu.edu
To [un]subscribe to this list, send e-mail to majordomo@taex001.tamu.edu
with [un]subscribe bb in the BODY of the message.
Please contact the mailing-list-owner as: bb-owner@taex001.tamu.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please send mail for the mailing list to: bb@taex001.tamu.edu
To [un]subscribe to this list, send e-mail to majordomo@taex001.tamu.edu
with [un]subscribe bb in the BODY of the message.
Please contact the mailing-list-owner as: bb-owner@taex001.tamu.edu
Home |
Main Index |
Thread Index