You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christophe Muller <cm...@kba-giori.com> on 2003/12/01 12:06:14 UTC

[users@httpd] Réf. : Re: [users@httpd] MIME types

Thanks for the advice.
I have downloaded ethereal. But do you know in what type of packet I 
should find the header of the DOC file ?

Regards,
Chris




"Robert Andersson" <ro...@profundis.nu>
01.12.2003 10:52
Veuillez répondre à users

 
        Pour :  <us...@httpd.apache.org>
        cc : 
        Objet : Re: [users@httpd] MIME types

[Please post plain text. HTML screws up archives etc and is evil]

Christophe Muller wrote:
> Yes, it is the case for all links (thay all works on some, all fail on
others
> clients). All clients have MS Office 2000...

You need to see the header correspondance between Apache and those 
clients.
Use a tool like Ethereal (http://www.ethereal.com/) to do this.

If Apache is sending the correct headers, there isn't much you can do from
the server-side, but need to look at the clients. A possible solutions 
would
include http://www.mozilla.org/products/firebird/ :)

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MIME types

Posted by Jeff White <jl...@earthlink.net>.
From: "Robert Andersson"

> Christophe Muller wrote:
> > I have downloaded ethereal. But do you
> > know in what type of packet I should find
> > the header of the DOC file ?

>
> I take that you mean the header/s of the
> HTTP response of the .doc file.
> Word's internal headers are irrelevant to us.
>
> What should happen when a client requests
> the document is this:
>
> Client sends request to server:
>
>     GET /path/to/word.doc HTTP/1.1
>     Host: www.domain.tld
>     etc...
>
> The server responds like this:
>
>     HTTP/1.1 200 OK
>     Content-type: not/sure
>     Content-length: 99999
>     ...some more headers...
>
>     (Word document data)
>
> So, these are the normal HTTP headers
>

A much easier way to get Apache's headers
is via the built-in usage of Windows Scripting.

Retrieving a Web Page
http://www.microsoft.com/technet/scriptcenter/other/scroth16.asp

Save the above Windows Script VBScript file into
any folder, using the file name GetHeaders.vbs.

To get all the headers sent from Apache
make these two line changes:

'*** To not get the text of the web page 
'*** add the comment makers '*** to the
'*** the below line like the following example.
'***WScript.Echo objHTTP.ResponseText

'*** For headers only comment out the above
'*** line and use the below line.
'**** And for headers:
WScript.Echo objHTTP.GetAllResponseHeaders()

The whole VBScript script is five lines long!

XMLHTTP is the same object that IE uses,
so beware that newer changes to the internal
IE upgrade/security code may have changed
the access mode to XMLHTTP too - Now if IE
is set to offline mode then XMLHTTP may error
out with: GetHeaders.vbs(5, 1) (null): 0x800C0008

So watch XLMHTTP usage with IE online/offline
modes. It may work currently even if IE is set to 
the online mode or offline access mode, even for 
localhost actions, or it may not (depending on IE
version upgrades etc.). If not working, set IE mode 
to online.

For server usage (inside Apache or even non 
server usage - does not use IE "parts") use 
WinHttp 5.1 like below:
'*** Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")

For local file access.
'*** url= "file://c:\documents and settings\filename.txt"

Once the above VBScript is saved into any
folder, then to run this VBScript, via the built-in
Windows Script Host (WSH) engine, cscript.exe,
open a command prompt window set to the 
above saved script's folder, and then type:

cscript.exe GetHeaders.vbs

And of course there is also the free utility
Wfetch.exe.

<quote>

The following features are available in the
current version of WebFetch:

Multiple HTTP verbs
(GET, HEAD, PUT, DELETE, TRACE, POST, OPTIONS)
Configurable host name
Configurable TCP port
HTTP 1.0 and HTTP 1.1 support
Multiple authentication types
(Anonymous, Basic, NTLM, Kerberos, Digest, Negotiate)
Client-certificate support
Multiple connection types
(HTTP, HTTPS, PCT 1.0, SSL 2.0, SSL 3.0, TLS 3.1)
Proxy support
Advanced requests that are entered manually or read from a file
On-screen and file-based logging

</quote>

Wfetch.exe Version 1.2

HOW TO: Use Wfetch.exe to Troubleshoot HTTP Connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q284285


Jeff



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MIME types

Posted by Robert Andersson <ro...@profundis.nu>.
Christophe Muller wrote:
> I have downloaded ethereal. But do you know in what type of packet
> I should find the header of the DOC file ?

I take that you mean the header/s of the HTTP response of the .doc file.
Word's internal headers are irrelevant to us.

What should happen when a client requests the document is this:

Client sends request to server:

    GET /path/to/word.doc HTTP/1.1
    Host: www.domain.tld
    etc...

The server responds like this:

    HTTP/1.1 200 OK
    Content-type: not/sure
    Content-length: 99999
    ...some more headers...

    (Word document data)

So, these are the normal HTTP headers you are looking for. I suggest you
start Ethereal on one of the misbehaving clients, start capturing just
before you click the link, and then stop the capture when the it has loaded
the document. Look for HTTP packets starting with "GET /..." (request) and
"HTTP/1.1 200 ..." (response).

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org