According to Oliver Braun:
> my htdig identifies itself as
> User-Agent: htdig/3.1.6 ([EMAIL PROTECTED])
>
> so i guess, it's htdig V 3.1.6.
>
> But isn't it very strange, that it doesn't recognize the standard mime-type???
> Is there a way to get information about how htdig processes the
> headerinformation?
You mean apart from reading the source code? Sometimes adding more -v
options helps, but not for this particular case. htdig does recognize
the standart text/html mime-type, but I'm not sure that your server is
returning it in the standard way. See below...
> Am Mittwoch, 12. Februar 2003 19:32 schrieb Gabriele Bartolini:
> > >I am using htdig on a linux-OS (SuSE 8.1), htdig/3.1.6
> >
> > Are you sure it is 3.1.6? Because the output here looks like coming from a
> > 3.2.x branch (with HTTP/1.1 support)
It's pretty hard to deduce which HTTP client is being used just from the
output from the HTTP server. Oliver's original excerpt just included
the header line output, and not the GET command issued by htdig.
> > >The webserver is Apache/1.3.27 (Unix).
> > >
> > >After starting htdig with
> > >
> > > > htdig -i -vvv
> >
> > type 'which htdig' and see the output. IMHO, you have another version of
> > ht://Dig on your system and your path picks it up. If that's the problem,
> > try using an absolute path (/foo_htdig_3.1.6_dir/bin/htdig -iv).
> >
> > >Header line: HTTP/1.1 200 OK
> >
> > Here is the guilty line ... :-)
I've noticed that some HTTP/1.1 servers still respond with that header
line, even when they get a HTTP/1.0 request. I think that's normal, and
shouldn't indicate that the server will expect the client to understand
the full HTTP/1.1 protocol. However, there does seem to be one snag...
> This is the original mail, about my problem:
...
> htdig responses with
>
> .....
> Header line: HTTP/1.1 200 OK
> Header line: Date:Wed, 12 Feb 2003 16:00:45 GMT
> Header line: Server:Apache/1.3.27 (Unix)
> Header line: Last-Modified:Wed, 07 Aug 2002 10:40:45 GMT
> Converted 07 Aug 2002 10:40:45 GMT to Wed, 07 Aug 2002 10:40:45
> Header line: ETag:"fcc8d0-267-3d50f92d"
> Header line: Accept-Ranges:bytes
> Header line: Content-Length:615
> Header line: Connection:close
> Header line: Content-Type:text/html
> Header line:
> returnStatus = 0
> Read 615 from document
> Read a total of 615 bytes
> "" not a recognized type. Assuming text
> size = 615
> .....
The very odd thing with these header lines is there is no space or
tab between the colon after the header name, and before the value.
I've never seen this before, and from my reading of the RFCs, this
isn't allowed in HTTP/1.0. It turns out it is allowed by HTTP/1.1,
where you can have any amount of white space, or none at all, but not
in 1.0, which requires a single space after the ":".
You can try the patch below to get htdig to allow these headers, but
you may have problems with other HTTP/1.0 clients on this server.
--- htdig/Document.cc.orig Thu Dec 20 12:28:04 2001
+++ htdig/Document.cc Wed Feb 12 16:16:51 2003
@@ -647,9 +647,9 @@ Document::readHeader(Connection &c)
else
{
char *token = line.get();
- while (*token && !isspace(*token))
+ while (*token && !isspace(*token) && *token != ':')
token++;
- while (*token && isspace(*token))
+ while (*token && (isspace(*token) || *token == ':'))
token++;
if (strncmp(line, "HTTP/", 5) == 0)
{
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html